A database is any organized collection of data organized to provide efficient retrieval.

learn more… | top users | synonyms (1)

1
vote
2answers
32 views

Multi-User Roles in Laravel

I am very new to Laravel. I am building a website where multiple users can have one or more roles. I have a users table and a user_roles table. Each ...
0
votes
0answers
16 views

Skip sending for all that return no results but still send to others [on hold]

PHP below checks person's preferences in the database then pulls relevant jobs that match their preferences from another database table. It then compiles it into an email... I can't get it to stop ...
3
votes
1answer
37 views

Transaction.atomic with continuations

I have a view that looks like this: ...
0
votes
1answer
26 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
4answers
487 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
120 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
125 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
421 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
92 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
55 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
112 views

Manage Connection Without 'using' statement

I replace this common statement: ...
2
votes
1answer
69 views

Throwing exceptions in a database wrapper

I hope the extension methods ThrowArgumentNullExceptionIfNullOrEmpty and ThrowNullReferenceExceptionIfNullOrEmpty are ...
4
votes
2answers
146 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
46 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
59 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
98 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

Extend a rethinkdb query, with `if`s

I have something roughly like this: ...
1
vote
0answers
67 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
68 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
81 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
228 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
280 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
69 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 ...
3
votes
1answer
410 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
70 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

OOP QueryHandler in PHP

I have a simple database connection class which is using PDO: ...
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
177 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
353 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
266 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
206 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

Facade pattern usage with JDBC-resource on Glassfish

For this project: ...
1
vote
0answers
336 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
165 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
114 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
371 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
336 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
185 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 ...