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

learn more… | top users | synonyms (1)

-1
votes
0answers
8 views

DB Model for Small requiremnt [closed]

I have created below DB model. Could you please validate if this is proper. This is restaurant app where waiter takes order and gives it to chef.Before placing order she does have information of ...
-2
votes
1answer
47 views

SQL table: store “status” as integer vs as string [closed]

I've been around a bunch of projects where statuses are stored in the db as a integer, then mapped in the model back to a human readable string: ...
0
votes
0answers
5 views

Normalized Database Diagram [migrated]

So I am working on my DB design skills, and have tried to create a normalized MySQL database. Here is the diagram: The reason I added the Address table is to break the address fields into separate ...
3
votes
2answers
47 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
124 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 ...
1
vote
1answer
40 views

Javascript Observable storage - revised

After my previous question, I have returned with a newer version :) the idea is to have some storage interface that exists of different buckets - known as Eagles: ...
1
vote
1answer
26 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 ...
1
vote
2answers
54 views

Realizing a SQL ResultSet into a Map in Scala

I am trying to realize a java.sql.ResultSet into a map, in Scala. ...
9
votes
5answers
885 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 ...
3
votes
0answers
89 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 ...
6
votes
1answer
83 views

Deleting a user from a database

I was hoping if anyone could tell me if I'm doing this correctly, I know there are other questions like this but everyone codes different and I just feel that I'm not doing this right. I'm trying to ...
4
votes
1answer
62 views

High school social network query for friends in common

This is sourced from the Stanford Coursera self study DB class SQL quizzes: Students at your hometown high school have decided to organize their social network using databases. So far, they have ...
2
votes
2answers
227 views
3
votes
1answer
102 views

Managing “Jobs” data in a Database

I've been working in a small page with some easy CRUD. The data I get from the database is getting shown on the page. But the way how i show the data feels a bit off. I guess it can be done in a much ...
2
votes
1answer
33 views

Query of attributes of mobile phone models, using several UNIONs to find distinct values

I'd like to know if there's any room to improve the following query which is to find distinct values from multiple tables when someone searches for a model name. Two of the tables are storing phones' ...
5
votes
5answers
584 views

Simple text DataBase

So I made this simple text database system for storing a list of objects because I hate using other database programs. But I was just wondering what you guys think I could do to make this faster and ...
0
votes
0answers
18 views

NoSQL schema for weather data

I am using NodeJS and MongoDB for a weather app that takes the weather info from a logger, saves it to a database, and relays the data to the browser in real-time. It is hosted here with code here ...
4
votes
3answers
60 views

Dataset Copy, Change, then Write new Rows back

I have this code, but I think it is too clumsy. It feels like a 12 point turn, is there a way to optimize it? Please note that this generates new rows from existing rows. ...
1
vote
0answers
36 views

Fast implementation of SQL Queries in Key-Value Store

I have an existing MySQL schema without rows and have already made a list of all SQL queries I need. Now I know that Redis is a key-value store, so you can only fetch data by key and save for example ...
4
votes
1answer
71 views

Database and file backup script

I created a Backup class because I couldn't find one that worked well on Windows and remotely, to do this I have combined a lot of questions on stackoverflow with a lot of trial and error to get it to ...
10
votes
1answer
85 views

Labor percentage and wages from clock in/out and sales records

I'm developing a PHP function for calculating labor percentage (labor cost/sales) accounting for daily and weekly overtime rules, if applicable, based on the payroll period; the wages for each ...
0
votes
0answers
93 views

Propel ORM Schema Builder

I've worked out my Schema Builder for Propel. In short: I've created a class that can be used to create the 'schema.xml' for building a database for propel dynamically, because I need this for another ...
2
votes
0answers
26 views

Abstract Key Value Store

I'm attempting to define an abstract interface for a key value store. Some requirements: Once a key has been written it should never be overwritten (although it may be deleted Transactions with ...
5
votes
2answers
229 views

Database Handler Class

I've written this DB Handler class. Please review it and suggest any code edits or point out mistakes and security loop holes. Please also suggest a better way to handle things, if there is a security ...
3
votes
0answers
85 views

Heterogenous tree in the application domain: How do I represent them?

The Domain I have three types of items in my domain: ItemA, ItemB, ItemC. (I can't use their real names.) ItemA has one attribute: thing_id. ItemB has 6 attributes: thing_id, name, description, ...
1
vote
1answer
76 views

Two implementations of website internationalization

I have attempted to create an internationalization system for my PHP framework that I'm working on. For the purpose I decided I will be using MySQL to store languages and translations. Respectively I ...
1
vote
1answer
90 views

Basic CRUD DAO using JDBC to access my database

I have a basic CRUD DAO using JDBC to access my database. I using a connection pool to get a connection in each method and then execute my commands. In some scenarios for update ...
4
votes
1answer
58 views

A simple database

After failing miserably to get SQL to work with Haskell, I decided to try making my own system. It's fairly simple, but works well for simple jobs (I made it to handle highscores for a number guessing ...
6
votes
5answers
423 views

Transaction handling for multiple SQL statements

In this code I update two tables called Payment and SalaryTrans. First I insert records (Salary payments) to ...
4
votes
2answers
127 views

My first model test in PHPUnit

I've just created a test to create my table gateway class. I've written about 8 tests and all are passing. I'm hoping anyone can offer any advice on what to do next to make these better. This is quite ...
5
votes
3answers
94 views

Relational schema and query for multiplayer tabletop game

As an exercise, I was asked to design a database schema (for MS SQL Server) for a tabletop game. The requirements were simple: players compete in matches and there are specific match types (e.g. 1v1 ...
5
votes
1answer
77 views

Selecting template from database using organization ids

This is my first SQL post over here, and in fact, I have more or less the experience of a regular SQL programmer, except that the task at hand this time was way harder than normal. I am expecting, ...
9
votes
3answers
87 views

Revision 2 - Step 1: PsychoProductions management tool project

I have been told by DBA.SE people that this was off-topic for DBA.SE and should be on CR.SE instead. So... here I submit this database schema design for my trusted fellow CRitters to review! This is ...
2
votes
1answer
232 views

Base generic DAO to work with different POJO classes

Right now, I have base abstract GenericDAO class to execute CRUD operations with different kind of objects. I have Customer and Employee POJO classes which are used ...
1
vote
0answers
44 views

Wrapper for database queries [closed]

I had a written code in Python, which works with a database and selects information. Every function in my class creates a session and executes some queries (their quantity varies). Also, each such ...
12
votes
2answers
90 views

Revision 1 - Step 1: PsychoProductions management tool project

I started a project to build my own invoicing and management system to take the place of prohibitively expensive QuickBooks software. This will be broken down in 5 steps, with the current step in bold ...
4
votes
1answer
138 views

How do I add JDBC and Queue functionality to a simple server?

I would like to add some capabilities to the server. Firstly, it should accept and handle connections with multiple clients, so that there are no mixups between clients. Secondly, there should be ...
4
votes
3answers
150 views

Did you like my product?

I have the following MySQL query which selects product details and whether the viewing user likes them. I feel like it could be more efficient and that there is a more practical approach than using a ...
0
votes
0answers
9 views

Implementing locks to make Google Search API ACID (Transactional)

x-post from StackOverflow, but I realized this question might be a better fit for this community. I'm working on an AppEngine project that requires flexible searches over a dynamic dataset, and ...
4
votes
1answer
178 views

Persistent key value store for Python using SQLite3

This is a module to implement a key value store in Python using SQLite3. Originally written to allow sharing of configuration among multiple threads that are already sharing a SQLite3 database, I have ...
2
votes
1answer
51 views

DB security and efficiency in WordPress plugins

I recently wrote my first WordPress plugin, which was also my first PHP project. After I was done, I didn't care for the code at all, so I have spent the past couple of days refactoring it. I'm trying ...
10
votes
1answer
230 views

Replacement for commit_on_success

I am porting an application from django 1.4.5 to django 1.6.1. I found that commit_on_success has been deprecated. Moreover I found specific incompatibilities when ...
4
votes
1answer
142 views

My simple PDO wrapper class

I made a simple database class and I wanted to know if there are any improvements I could work on as far as readability, efficiency, methods and making it modular goes. Any other suggestions are also ...
1
vote
2answers
64 views

Where to protect DB data against XSS injections?

To protect my web site against XSS injection, I am using OWASP Encoding Project. Is it a good idea to protect all data retrieved in my DB to avoid XSS by going throuh all the data just returned by ...
2
votes
2answers
65 views

Managing and searching objects using tags

I wonder Is it appropriate to hide imported classes (collections and UserDict in this case) from Python IDE (e.g. IPython)? Is there a more efficient algorithm/implementation? Please feel free to ...
2
votes
1answer
81 views

Security of authentication check for a blog

I am currently making a very big blogging system for my Website where I want really neat code! So, I was wondering: is this method safe/does it have any problems with security? Yes, I'll be encrypting ...
7
votes
3answers
534 views

Are these Java MySQL connection classes and methods implementation the optimal?

I got three classes for MySQL Database access/manipulation, First : Conector. It has got methods for connecting, disconnecting, querying and updating db. Second : ...
2
votes
1answer
61 views

Delivery geolocations query

I have the below MySQL query that does exactly what I need. But I am sure there are better queries that do the same thing. If you see something very ugly or bad and have any suggestions, I will be ...
2
votes
1answer
140 views

Cleaning up nested promises in Cloud function

I am writing the Cloud function for Parse whose purpose is to update my database with a provided array of data objects. The main problem are the nested promises, which doesn't look right. Any help ...
6
votes
2answers
104 views