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

learn more… | top users | synonyms (1)

3
votes
1answer
81 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
20 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
552 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
15 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 ...
-2
votes
0answers
18 views

Are these the correct functions for creating a database connection,creating table,cleaning data for D.B and inserting the data in database in php? [duplicate]

Initialising variables Is this the correct code of the database connection function?( Assuming we have connected to the Database) ...
4
votes
3answers
43 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
26 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
60 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
73 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
70 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
25 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
224 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
82 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
73 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
61 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
54 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
356 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
118 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 ...
-2
votes
1answer
28 views

In T-SQL when creating a table with an identity column what data type should be used? [closed]

In T-SQL, when creating a table with an identity column, what data type should be used? Should the data type be numeric, bigint or a different type altogether? For example: ...
5
votes
3answers
79 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
76 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 ...
1
vote
1answer
169 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
40 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
83 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
137 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
149 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
108 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
50 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 ...
4
votes
1answer
122 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
62 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
62 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
80 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
491 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
59 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
109 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
99 views
6
votes
2answers
173 views

My database class extends MySQLi

The following is a small class I extended MySQLi with. I'm going to use this in my upcoming projects, but my main reason to do this class is learning, so I would like to submit this for your review, ...
5
votes
1answer
38 views

Separating Duplicates from Uniques

I have a MySQL table with a very large data. What I need is to find and separate duplicates from the unique rows Let's say this is my table: ...
3
votes
1answer
225 views

Flat-file DB with CRUD

I just finished writing a flat-file DB class for PHP which supports selecting, updating, inserting and deleting. I was wondering if there are any ways to make it faster or if I'm doing anything the ...
3
votes
1answer
75 views

Appropriate way to create object for storing data in a ListView & Profiling

I'm creating a location based reminder application in Android using proximity alerts, geocoder, Google Maps API and their Places API. Currently there is a default ...
2
votes
2answers
108 views

how can I factor out REST-POST activity to a manager?

I have this RestPostActivity: ...
3
votes
1answer
310 views

Simple in-memory database

How can I improve this code (elegance, best practices, etc)? ...
7
votes
2answers
370 views

Using keywords async/await in database queries (Windows Phone 8)

I have a local database in Windows Phone 8 app. The app includes a lot of queries to the database and I don't want bad effect on the responsiveness of UI. For ...
7
votes
3answers
543 views

Disposing the Context in the Repository pattern

I have a question about the Repository pattern: ...
4
votes
4answers
95 views

Music list program

I need a little help with improving my first Java program. I have programmed for about a month, so my code is quite messy. The program is a "Musiclist" program, with which you can add songs, edit ...
4
votes
1answer
214 views

In-memory data cache architecture for data transfer

I am writing a cron job to manipulate and transfer remote data. I need to cache data from a table, process it, merge with previous table, iterate the process, and eventually send the result data to ...
1
vote
1answer
96 views

Updating visiting dates of each visitor

I am still a PHP beginner. Please review/improve my PHP code and reveal errors, typos and warnings. ...
1
vote
1answer
69 views

Data table class

so this is my code and I just want to improve it, I'm a beginner so I think there are some better and short ways to do what I did here. Any Ideas? The code: ...