A database is any organized collection of data organized to provide efficient retrieval.
1
vote
0answers
15 views
0
votes
1answer
24 views
Synchronizing two SQL Server database tables with the most recent changes to both tables
I'm very new to SQL, but I'm coding a C# program that interacts with a database. There's a master database on my computer, and there's a client database on my tablet.
When I re-connect my tablet to ...
5
votes
3answers
470 views
Database adapters
I'm writing adapters for some MS Access database because I really didn't like that automatically generated code that Visual Studio was providing. Right now I just need to get data, not updating ...
5
votes
2answers
109 views
Slim API with 3 layer architecture
I'm new to Slim and the three layered approach I'm using below. So far I have the API, a Presentation layer (leaving out for now), a Business Logic Layer, and a Data Access Layer. The code's working, ...
4
votes
1answer
117 views
Key Value Flat File System - Single Header INI replacement
I'm very happy with the performance, but I always try to optimize my code as much as possible. Since I plan on using the code in production, I feel more save posting it here first. I probably missed ...
5
votes
4answers
416 views
Educational website using ASP.NET webforms
Our team is developing an educational website using ASP.NET webforms. We designed DAL & BAL classes and now I have some questions:
Are DAL & BAL designed well?
Would it be better using ORM ...
4
votes
2answers
89 views
C# Method to determine database status
I have a task that I am trying to complete and would appreciate direction, to know which is the most efficient path to take for future requirements.
Use Case: A background process that determines if ...
4
votes
1answer
52 views
Pickling cars with simple management system in Python
This is my first Python program (before that I've been just poking around with the interpreter itself). I took this opportunity to do some user input and play around with ...
6
votes
1answer
105 views
2
votes
1answer
66 views
Throwing exceptions in a database wrapper
I hope the extension methods ThrowArgumentNullExceptionIfNullOrEmpty and ThrowNullReferenceExceptionIfNullOrEmpty are ...
4
votes
2answers
143 views
Library Management System
I have created a Library Management system. Can anyone please look at if see if there's any bad practices or if anything could be done better?
Main.cpp
...
2
votes
1answer
45 views
Database module for node.js
This will get quite clumsy if I continue down the road with this design, so I'm asking you, enlightened ones, is there a way to make this prettier and easier to understand? Primarily the ...
1
vote
0answers
37 views
Checking subscriber download limit
I have a domain model which determines whether a user has any access left.
This class is loaded from the database on each web request.
The setter on the property that determines the access limit ...
2
votes
2answers
58 views
Query using cross join or inner join
Please consider the following three tables that I am playing with in the image below:
I want to come up with a SQL Query which shows first_name, last_name, and the total amount of all orders for ...
3
votes
1answer
92 views
CRUD (database layer) for F# with TypeProviders
I am a newbie in F# and I am thinking about use F# in my next project. The project will work the database and I need to store and retrieve instances of objects in the Db.
Could you please check my ...
2
votes
1answer
85 views
Performance shifting for SQL Database and Linq memory grouping
I am messing around with shifting between stored procedures and business layer EF getting data rapidly then processing in memory.
This works and on a static data range of 3 months I get execution ...
1
vote
0answers
12 views
1
vote
0answers
65 views
Create and access database connection
I'm working on an MVC project and I'm writing the code for get access to the database connection.
I have two files:
The first (PdodbLib.class.php) extends PDO:
...
2
votes
1answer
67 views
Checking for duplicate values in database with Python
I'm working on a Python application where I read and extract data from an HTML file. The data is stored in a list, and the number of items in a list is, on average, 50,000+.
The items from the list ...
0
votes
1answer
80 views
Queue like system to check existence of email
I have a table in my database containing email and email_state amongst other values.
Email is the email of the contact, and ...
-2
votes
1answer
76 views
Reducing database access time and connection count [closed]
I have 2 connections. How can I reduce this to one connection?
...
4
votes
1answer
127 views
Lazy Load for multiple entities at a time
We have a system with a non standard database solution. All trips to the DB are rather expensive. We cannot use entity framework.
Currently our lazy loading is on an entity by entity basis. So if I ...
15
votes
1answer
227 views
Modeling a Mage character from nWoD, using Django
Goal
Design a representation of a mage character from the World of Darkness RPG, as well their associated spells.
Here is a visual representation of the schema. You can see it more closely ...
3
votes
2answers
263 views
Create SQLite backups
I have this script for creating SQLite backups, and I was wondering whether you'd have any suggestions on how to improve this. I was thinking that maybe it should create the backup ...
3
votes
0answers
68 views
Rails models for Users, Offers, Comments, Documents, and Reviews
I want to simplify my Rails models, current looks like this:
...
2
votes
0answers
27 views
Auto-expire key/value database (with different key types) in Haskell using acid-state
I am making a key-value database using acid-state. It has three similar "pools", one for cookie records, one for email verification of new accounts, and the last for resetting passwords.
There are ...
2
votes
1answer
385 views
Optimizing for data import in Neo4j using py2neo
Here is my code for importing from a .csv to a neo4j graph using py2neo and cypher statements. I've noticed that it slows down significantly the bigger the graph gets. It takes several seconds just to ...
2
votes
1answer
44 views
Creating keyword records in a database
This code is part of a data model used to create keyword records in a database.
...
2
votes
0answers
68 views
How common is the use of closure in Lisp?
I'm writing a little tool for mangling MP3 collections and, as a challenge, I decided to write in in Hy, a dialect of Python that uses Lisp syntax. Like every good developer, I wrote out my list of ...
1
vote
0answers
20 views
Bitcoin, detecting deposits to the node.js server
I'm trying to detect deposits that user will made. I explained it with comment lines in below.
Can you say are there any flaw in it?
...
7
votes
1answer
89 views
Summing the prices from Transaction files
I need to cut down the run time of this query. Currently it's taking 45 minutes. Is there something I can change in the table or the query to allow this to run faster?
...
1
vote
0answers
58 views
3
votes
3answers
112 views
Cancelling an order with a side-effect of logging the operation
I have a data access layer method to cancel an order. This operation should have an associated "operation history" entry.
My first (naïve) implementation looks like this:
...
5
votes
1answer
68 views
TrackDAO: what can be improved?
In this specific situation there is a table with trackdata and a form to add rows. For the sake of clarity I won't include the view-related code here. The added rows are added to a LinkedList when ...
1
vote
0answers
174 views
Django Model field naming convention for lookup tables
I'm currently in the process of refactoring a Django app to use Django REST Framework. Within the existing code there are 15 models for lookup tables. The structure of each model is as follows (using ...
1
vote
2answers
48 views
Looking up the name and event for a ticket
This code is from my Kohana project. How can I make it more beautiful? Should I use try-catch instead? How could I avoid writing exit() twice?
...
4
votes
1answer
348 views
Dapper helper service
I've written a very light wrapper around Dapper to help with unit testing and streamlining the Dapper commands I need.
Execute() is a method created to remove the ...
3
votes
2answers
263 views
Database assignment with MySQL and Swing
I have completed this assignment from Stanford CS108 on MySQL and Swing (it's part B). It would be wonderful if someone could point out my weak spots in the code and overall design.
I have uploaded ...
0
votes
1answer
199 views
Data Access Layer and Business Objects
This is my first cut at separating the data access layer out of my very old spaghetti codebase.
I have tried to keep this as simple as possible, it is for a small project, so I am not really ...
1
vote
2answers
2k views
School Library Management System
I require feedback on the plethora of bad practices that are definitely existing in the following code:
...
0
votes
1answer
40 views
1
vote
0answers
331 views
Real-time bitcoin data feed and storage using websocket framework
I'm trying to create data feed script for real time bitcoin data for OkCoin exchange using their websocket API (documentation) and a database manager for storing. There are two channels i am ...
4
votes
1answer
163 views
PHP MySQL Database class
This is a PHP database class. Yes, I know it's using the MySQL functions, which are deprecated, but I shall be updating it to MySQLi soon. Can you please review this code and give any comment on any ...
2
votes
0answers
111 views
Structure of database model for a Flask project
I'm working on a project with Flask and I'm trying to follow Miguel Grinberg's Flask tutorial as closely as possible while creating what I need for my own project.
Overall, how does it look? Miguel's ...
3
votes
2answers
361 views
Using Custom Attributes to Populate Members from IDataReader
Just learned how to use custom attributes in C# and the first useful thing I did with it was to make a class object representing a database table. The constructor can accept an ...
2
votes
2answers
330 views
Simple Database Abstraction Layer
I'm learning PHP and currently object-oriented programming. I would like to get a feedback; how I'm doing so far. If I have bad coding that should be fixed immediately etc. I'd call this code an ...
2
votes
1answer
107 views
Observable storage - revised
Previous question:
JavascriptObservable Storage
The idea is to have some storage interface that exists of different buckets - known as Eagles:
...
2
votes
1answer
174 views
Sharing a database connection with multiple modules
I am building what essentially could be viewed as a glorified database wrapper as a Python package, where I'm having several classes and functions spread out into different modules. My current problem ...
10
votes
5answers
3k views
Singleton Database class
Currently my team is building an application involving a database. We have to write a lot of data (approx 2,000,000 records) to the database and therefore we decided to open a connection once and ...
5
votes
1answer
215 views
Core Data model for test-taking iOS app
I'm building an iOS app for test-taking and I want to be sure of my model before proceeding.
I found this post very helpful and tried to implement a simplified version for Core Data.
Here are some ...