A database is any organized collection of data organized to provide efficient retrieval.
0
votes
2answers
49 views
0
votes
2answers
28 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?
...
2
votes
0answers
37 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
72 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 ...
0
votes
0answers
6 views
Proper tree NoSQL structure with focus on full-text searching [migrated]
I developing an app with tree(folder-file) structure, on which I should perform full-text searches with MongoDB. I did a research on the best tree structure practices and found this great article, but ...
2
votes
1answer
71 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
43 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
57 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
76 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
93 views
0
votes
1answer
21 views
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
72 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
31 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
233 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
51 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
34 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
57 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
54 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
138 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
52 views
Observable storage - revised
Previous question:
JavascriptObservable Storage
The idea is to have some storage interface that exists of different buckets - known as Eagles:
...
1
vote
1answer
34 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
72 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
968 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
106 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
88 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
73 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
241 views
Having a class return a single database instance or list of all database instances
I'd like the following to happen:
...
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
597 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
24 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
83 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
50 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
80 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
89 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
109 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
234 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
77 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
128 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
59 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
587 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
135 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
108 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
78 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
91 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
362 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
47 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 ...