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

learn more… | top users | synonyms (1)

3
votes
0answers
31 views

Updating results when an opinion poll is answered

Let's say I am trying to build an opinion poll app, such that I can create a template of an opinion poll, give it multiple sections/questions, assign multiple people to different copies of a given ...
1
vote
0answers
31 views

Generic Sql Connector classes

The need came up the other day to be able to easily switch back and forth between making IBM DB2 queries and MS SQL queries. I didn't want to mess with NHibernate as I was on a time crunch, and I also ...
3
votes
4answers
378 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 ...
0
votes
0answers
4 views

Cakephp Career Database Design [migrated]

I am new in cakephp, I want to develop a simple career website, I have design the database, but i would like to show it to professionals and know if the structure is ok Jobs Table -id -job_title ...
4
votes
0answers
34 views

MySQLi library for handling MySQLi interactions

I wrote this class recently to better structure and handle MySQLi related interactions with PHP and would love to get some feedback. ...
0
votes
0answers
6 views

Social file sharing database schema [migrated]

I have a project called social media file sharing. I have this database schema and I need your opinion about what I should remove or add or edit on my database schema. Every user can upload media ...
4
votes
2answers
77 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 ...
1
vote
1answer
34 views

Laravel time-punching database structure

I am trying to build a database structure for a time punching system. What I'm trying to figure out is if what I have is the ideal structure, or if something else exists that I'm overlooking. I want ...
4
votes
2answers
42 views

Shopping cart login and coupon code validation

I am figuring out how I could make the following query more secure: I have already used mysqli_real_escape_string but I doubt that adds much to security. I have ...
0
votes
0answers
32 views

Converts large csv dataset to hash then imports into MySQL/SQLITE3 database using Sequel

The main line in this script that allows Sequel to insert records into the database table is ...
6
votes
1answer
89 views

Manage Connection Without 'using' statement

I replace this common statement: ...
2
votes
0answers
104 views

SecureString as SqlParameter value without GC concerns

The purpose here is to make it easy to use sensitive data that is already in the form of a SecureString (example) without converting it to a ...
2
votes
1answer
54 views

Throwing exceptions in a database wrapper

I hope the extension methods ThrowArgumentNullExceptionIfNullOrEmpty and ThrowNullReferenceExceptionIfNullOrEmpty are ...
1
vote
1answer
40 views

Perform SELECT INTO Statement and add Primary Key afterwards

How can I improve this TSQL Statement in terms of performance? ...
4
votes
2answers
127 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
42 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
34 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
0answers
45 views

Optimizing Cassandra Schema to avoid deleting data

I come from MySQL type of mind frame but have worked with MongoDB and ElasticSearch type of NoSQL. I'm using a small use case of Cassandra to able to scale a playlist format for users. In C* Summit ...
3
votes
1answer
58 views

Checking referential integrity of a database schema

I am using PHP PDOs to parse the results I am receiving from MySQL queries against a database. I am now running into an issue with running out of allocated memory. Are there any suggestions on ...
4
votes
2answers
370 views

Importing MySQL Database to a .txt File

We just finished working on a Database project in Java Netbeans. We added the feature Import which will import the database record of one user to a text file. ...
6
votes
2answers
79 views

Database access concept

I've got a small tomcat web application that's used to receive customer data from an iPad app. After receiving those information they will be saved on a local MySQL database and then sent to an SAP ...
2
votes
2answers
49 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 ...
0
votes
0answers
64 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 ...
1
vote
1answer
77 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
61 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: ...
5
votes
3answers
137 views

SQL database design for ecommerce

I need to create a database which stores details products, Manufactures,Suppliers. So initially I divided Products into categories and subcategories. These are the tables I created. ...
2
votes
1answer
61 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
75 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 ...
-1
votes
1answer
70 views

Reducing database access time and connection count [closed]

I have 2 connections. How can I reduce this to one connection? ...
0
votes
0answers
14 views

How do I optimize this MongoDB query

Here is the query in the Rails console: ...
4
votes
1answer
123 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
222 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
206 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
61 views

Rails models for Users, Offers, Comments, Documents, and Reviews

I want to simplify my Rails models, current looks like this: ...
2
votes
0answers
25 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 ...
7
votes
1answer
187 views

Database abstraction layer for PHP web application

I'm working on a PHP based web application. While building the UserStorage class, (which acts as a storage source for user data, and implements the ...
2
votes
1answer
300 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
42 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
66 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
18 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
88 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
56 views

OOP QueryHandler in PHP

I have a simple database connection class which is using PDO: ...
2
votes
2answers
244 views

Small PHP DAO app

I'm creating a small app and decided to write my own DAO for learning, etc. At the moment it's in one big file, which I really don't like. Could you give me some tips on how: you would separate ...
3
votes
3answers
109 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
66 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
145 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 ...
0
votes
2answers
86 views

Dynamic connections classes

I have an abstract Connection class which looks like this: ...
1
vote
2answers
46 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
321 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 ...