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

learn more… | top users | synonyms (1)

1
vote
0answers
29 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 ...
0
votes
0answers
26 views

Is this pattern for passing a LinqToEntities connection safe? [closed]

I've written a Data Access Layer for an MVC app I'm working on. Several Controller methods call several functions from the Data Access Layer. If more than one function is called, I initiate the ...
2
votes
0answers
36 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
51 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 ...
3
votes
2answers
333 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. ...
-2
votes
0answers
30 views

Table Design For Patterned Data For Variable Bucket Ranges [migrated]

Looking for table design for this scenario to be implemented on SQL Server 2012 instance. Scenario There are a total of seven types of reported data, each with variable number buckets of ...
6
votes
2answers
73 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
39 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
30 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
60 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
8 views

Extend a rethinkdb query, with `if`s

I have something roughly like this: ...
1
vote
0answers
52 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
94 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
56 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
60 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
56 views

Reducing database access time and connection count [closed]

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

How do I optimize this MongoDB query

Here is the query in the Rails console: ...
4
votes
1answer
106 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
201 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
75 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
48 views

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

I want to simplify my Rails models, current looks like this: ...
2
votes
0answers
20 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
175 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
150 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
60 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
17 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
50 views

OOP QueryHandler in PHP

I have a simple database connection class which is using PDO: ...
2
votes
2answers
178 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
101 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
63 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
98 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
76 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
218 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
745 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
132 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 ...
2
votes
2answers
168 views

Database assignment with MySQL and Swing

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

Schema design for user profile

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

Facade pattern usage with JDBC-resource on Glassfish

For this project: ...
1
vote
0answers
22 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
255 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
52 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
386 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
118 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
77 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
189 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: ...