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

learn more… | top users | synonyms (1)

0
votes
0answers
10 views

Giving a MYSQL Database a “version” [migrated]

I am writing a game that uses an embedded mySQL database for keeping track of scores and I am releasing an alpha soon. I know there are going to be features added down the road which are going to ...
1
vote
0answers
34 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 ...
0
votes
0answers
4 views

Database design for an exam system [migrated]

I am working on creating a simple exam system, in which you are going to be basically able to store students, classes, exams, questions and scores(and some other stuff that those depend on). I am also ...
1
vote
0answers
16 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
87 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
37 views

OOP QueryHandler in PHP

I have a simple database connection class which is using PDO: ...
2
votes
2answers
80 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
94 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
61 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
24 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
66 views

Dynamic connections classes

I have an abstract Connection class which looks like this: ...
1
vote
2answers
43 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
75 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 ...
0
votes
2answers
145 views

Connecting to a MySQL database with C#

Can anyone help me with checking this code? It is for connecting to a database. The method getFromDatabase is to take values from the database and put it to a ...
2
votes
1answer
92 views

PDO PHP DB Class

I've been building a PDO PHP DB class and I just wonder if someone could give me some feedback (regarding security, how the code is written and how I can optimize it). This class is not finished ...
0
votes
0answers
69 views

Database assignment with MySQL and Swing

I have completed this assignment from Stanford CS108 on MySQL and Swing (it's part B). And it would be wonderful if someone could point out my week spots in code and overall design. I have uploaded ...
0
votes
1answer
68 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
117 views

School Library Management System

I require feedback on the plethora of bad practices that are definitely existing in the following code: ...
5
votes
3answers
104 views

Schema design for user profile

I have the below schema for user profile management: ...
0
votes
1answer
27 views

Facade pattern usage with JDBC-resource on Glassfish

For this project: ...
1
vote
0answers
19 views

Structuring my MongoDB application documents

I'm just starting out on an application and I've heard some good things about MongoDB so I thought I'd give it a crack in this new project to see how well it works. Please bear in mind that prior to ...
1
vote
0answers
97 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 ...
5
votes
2answers
39 views

Out of one Oracle into another

A project that I have been working on required data to be transferred from an Oracle database into MySQL. The process I devised for that transfer involved a query (included below) on the Oracle ...
10
votes
3answers
263 views

Trading Card Game database schema for statistics

This database schema will be used in conjunction with various systems as related to an online Trading Card Game, mostly for permanent storage and statistics. Some example cases would include: JDBC ...
4
votes
1answer
67 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
48 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 ...
-2
votes
1answer
75 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: ...
3
votes
2answers
65 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
153 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
62 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
46 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
3answers
102 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
1k 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
1answer
118 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
97 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
92 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
264 views
3
votes
1answer
103 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
34 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
653 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
31 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
138 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
66 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
91 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 ...
9
votes
1answer
98 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
119 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
239 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
87 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
78 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 ...