This tag is for general database questions; if you question is specific to SQL use that tag instead.

learn more… | top users | synonyms (1)

0
votes
0answers
24 views

Using a single table for identity and metadata

I'm in the early design phase of a project to provide an e-commerce platform that will require several entities to be modelled, products, customers, orders, CMS pages, etc. They will all have a few ...
1
vote
3answers
207 views

Why is my page load time so closely correlated with number of database queries?

Whenever I'm doing web development, and a page takes longer than half a second to be generated, I know that somewhere my code is hitting the DB too many times. The normal way to fix this situation is ...
1
vote
0answers
72 views

Database version management on mobile apps

I am about to start building a mobile (iOS/Android) app that uses a local database (probably sqlite). Since this is my first "real" mobile app, I am wondering what the standard approaches are to ...
2
votes
1answer
91 views

Is it substandard if I have multiple tables in my database yet there's no relationship at all? [closed]

I have multiple tables in my database. Some tables have relationship to others and some don't have. My friend told me that it is not advisable to have a table that is not related to others. Is it ...
0
votes
0answers
27 views

Keeping data consistent across ACID database and a bunch of blobs or files

I have a database that is ACID. And I have a different data storage that is not relational or acid compliant. Let's say its just a bunch of blobs or files. I want to make sure that these two data ...
4
votes
3answers
214 views

OOP and relational databases [duplicate]

I see a lot of talk in the OOP world about principles and laws such as Open/Close and Loose Coupling, I can understand how they are so high valued, However I seem to have ran into a problem with ...
0
votes
2answers
299 views

How do programs like JAVA and C++ store variables in a database , does it still use MySQL like in PHP? [closed]

I imagine they have to have some sort of query to goes to a database , or maybe I'm wrong and they can just store it to their computer? Is MySQL for server - side scripting only?
0
votes
2answers
52 views

Methods to keep an external service up to date that polls your service periodically?

Sorry if the title is hard to understand, it is easier if I describe the scenario to get the question across. I have a service that collects data, performs business logic and does all the normal ...
0
votes
0answers
57 views

what should I save in local android DB to be more efficient and to last more than one session (and shouldn't be stored in the server only)?

I write an android app. The user sends the server its location and get places relevant to him. He then can up-vote or down-vote any offer. I wonder if I should write to local DB and when? I ...
0
votes
2answers
46 views

Store the result of a complex but frequent database query, in another temp persisting table

I have a slightly complex SELECT query which uses a number of JOINs and variables inside it and the query is run frequently throughout the application. The result varies when one column is updated. ...
2
votes
0answers
51 views

What are some important considerations when developing a DBaaS (DataBase as a Service)

I'm interested in creating a Database as a Service. I want users of the service to be able to do a few seemingly not very simple things. Sign up and be given access to a JSON datastore that they can ...
0
votes
0answers
62 views

Spring JDBC Template without DAO?

I am rather new to writing applications that interact with databases, and I'm curious about a project I'm working on. I have to write a very simple web app which is going to be displaying metric data ...
3
votes
3answers
373 views

Is it better to use a switch statement or database to look through 5,000 to 10,000 instances?

I have some JSON data in this format (5,000 instances for now): {"id":"123456","icon":"icon.png","caseName":"name of case"} I am allowing the user to search for the name of the case and then return ...
4
votes
6answers
319 views

Are HSQLDB unit tests an anti pattern?

HSQLDB is great. It (also) has an embedded mode (no dedicated server needed), which allows for quick prototyping of stuff like Proof of Concepts, and it can also be great in production-ready ...
1
vote
1answer
34 views

Socket Connection Data Insert

I have been working through a high-performance application where I have identified a bottleneck. The bottleneck is actually when the application must insert messages from a socket, it will record them ...
1
vote
1answer
41 views

Transparently adding a database interface layer

I am currently looking for ways to optimize an application that is consuming unacceptable amounts of memory. The process basically takes input and parses it into a tree. The tree is currently stored ...
1
vote
2answers
94 views

Using Hibernate Criteria framework for complex queries vs. just making views in DB

I like using Hibernate for regular simple CRUD operations. However, I am trying to understand why anyone would resort to its Criteria framework to assemble complex recordset criteria as opposed to ...
1
vote
2answers
103 views

How to store currency ranges in a Postgres table?

I am using Postgres 9.3. I have to store range data like <$250K, $250K-$4M, etc which we will display in a dropdown. now I am making a table for all possible options that can be configured from ...
0
votes
0answers
54 views

Design of a custom query result array with lazy loading

I have a database that generates a query result array, each position of the array being a hash like object. Since each array item must be mapped into a well defined class, I decided to implement an ...
2
votes
2answers
152 views

single table w/ extra columns vs multiple tables which duplicate schema

I am working on a project where at some point, I needed to make a decision on whether or not, in the database, I should have a single table with multiple columns that not every record uses, or ...
2
votes
1answer
53 views

Requirement that code changes within release be reverse compatible with DB schema

I have recently come across a requirement related to our release/SDLC process that seems a little out of the ordinary to me so I am writing this to inquire whether this practice is common and, if not, ...
1
vote
1answer
289 views

Creating a online database creator

I've been thinking of creating an online database creator (think DabbleDB, Zoho Creator, Intuit Quickbase, etc.). I've been thinking of a couple solutions: Have 4 database tables: Tables, Rows, ...
0
votes
4answers
123 views

When to store Date/DateTime?

I'm working on a social network website and I'm not quite sure when I should store the date/datetime. The service includes some of the following events: Register/Login Follow "Like" (images & ...
0
votes
1answer
97 views

Comment system sorting madness

I have a website in which I'm loading all of the users' comments by the number of likes they have. This has caused me some troubles. Let's say comment #1 has 5 likes, comment #2 has 2 likes, and the ...
2
votes
3answers
162 views

How does database connection pooling improve application performance?

I can't understand why connection pooling improves application performance. I suppose connection establishment would cause latency. But reusing an established connection requires more complex error ...
2
votes
3answers
165 views

Tracking correct order details in commerce database when modifying 'products'

I am implementing an ecommerce database. This is slightly different than most as the 'products' that are for sale are for services provided. For example a user (vendor) of the system may define a ...
3
votes
4answers
265 views

When should a database table use timestamps?

First a note, I thought maybe this question belonged in the database exchange, but I think it is more broadly related to a programming solution as a whole than to databases. Will move to database ...
1
vote
2answers
132 views

Is eventual consistency a wrong solution for e-commerce applications?

I'm reading about eventual consistency in couchDB. I'm somewhat confused by the term and its consequences on an application. Let's say I'm building a distributed e-commerce website where monetary ...
0
votes
0answers
50 views

Automobile database logic [duplicate]

I am building a web based quoting system for a local automobile dealership. I think I have figured out the logic for the databases but I want to get a second opinion before I start just to make sure ...
0
votes
2answers
108 views

What's the easiest (quickest) way to share one dataset in my app with someone else

I have some javascript that creates a canvas image that I want users to be able to share. I simply need to save the image somehow. Nothing else. I've been contemplating using bits and pieces of ruby ...
0
votes
2answers
137 views

How do I read the Entity Framework Model and validate it against a given connection?

I have a Entity Framework Database First Model. I want to write a MSTest/nUnit test to verify that all the stored procs, tables and views that are defined in my edmx model are still valid on the ...
0
votes
0answers
52 views

Creating A News Feed with Relevant Data for App

I'm creating an app that currently allows users to create topics, vote in topics, follow topics, and chat in topics. Currently working on creating a News Feed like Facebook or Twitter that brings ...
-4
votes
2answers
432 views

Best way to keep large amounts of data (no relational database needed)

I would like to know what should be the best way to keep data on a server related to the following points: Chat logs Heavy text content User references like amounts of ids (1,4,14,524,23220,...) ...
3
votes
5answers
237 views

Violating SQL principles

I have to write a decent size database, 1GB more or less. I have only taken an introductory semester regarding SQL databases. During the course we learned that the relational model under SQL has no ...
8
votes
3answers
157 views

Cascading “Deleted” records that aren't really deleted

Just trying to get some ideas on what people do for this scenario. We have a system database(SQL Server 2008 R2) that has tables and every table has a field we can call "Deleted". It's basically a ...
2
votes
2answers
102 views

How to represent compound elements within a database?

I need to design a database table that holds the data of programmers work hours. The problem is that I have a compound type - two pieces of data belong to a category. Specifically, the work hours ...
0
votes
1answer
75 views

database replication or custom solution like creating enterprise “bus”

I'd like some input on how to keep databases that are running on different servers throughout our organization synchronized. We have a registration system of sorts, and when user "John Doe" registers ...
0
votes
0answers
85 views

Extending user registration in Django site that uses both site admin tables and my own module?

I'm writing a Django site that registers a particular type of user and this is done by the resources that come with the framework, the site administration. The issue: I'd like to create a new model ...
-1
votes
1answer
76 views

When to use non-embedded databases over embedded databases [closed]

We are trying to start a web base project that need to develop based on MS technologies such as C#,.net, IIS etc. This is a web application suppose to sell as a product with a single installer. Now ...
0
votes
3answers
386 views

Unique and primary keys on a database (mysql)

I'm having quite some doubts here... If I have a table related to username/password login how can I assure there won't be any more matches of the same username and password in the same table using ...
0
votes
2answers
113 views

Google App Engine overview

I have gone through many Google App Engine tutorials, and I became quite familiar with how to do basic stuff like implementing a webapp2.RequestHandler, and using ndb.Models to manage your data. Now, ...
2
votes
3answers
162 views

What is a good use case for native XML databases? [closed]

What would be a good use case to use a native XML database such as Apache Xindice and eXist-db? I have used XML features of SQL Server in the past and they were of great value, but there it is ...
2
votes
3answers
419 views

Optimal way to implement this specific lookup table in C#?

I want to create a lookup table for this data: The "input variables" (what is used to "lookup") are 4 different doubles that can each take on 1 of 200 numbers (the numbers range from 1-1000 but there ...
2
votes
1answer
94 views

Detecting travel patterns in geospatial data

I need to analyze data uploaded from vehicle GPS devices to detect travel patterns and then attempt to learn about the normal travel patterns for that vehicle so that predictions can be made about ...
4
votes
3answers
206 views

How to avoid unmaintainable code when using SQL in an MVC setting?

I want to present a list of products to the user. This list is paginated and can be sorted by the user by product ID or product name in ascending or descending order. I am using an MVC setting, where ...
1
vote
1answer
1k views

DbFirst vs Code First? what should I use if I rely on Stored procedures

This question is asked many times, and I always prefer code-first as I like to keep the logic in code. But now I have a challenge to load screen under 5 seconds and very little time to do things. I ...
3
votes
1answer
56 views

Specific and generic behaviour for derived objects that client doesn't need to be aware of

We have a database with tables that use an inheritance hierarchy. An entity in the derived table will have an ID that matches an entity in the base table and so on through the hierarchy. We have ...
1
vote
4answers
208 views

How to store collections of linked Text objects in database

I'm writing a Java program that works as a presentation of a written document, which needs to be stored in a database (I'm using MySQL, but am open to suggestions of other DB types). The Essay class ...
5
votes
5answers
428 views

Is there a downside to using Access as a database?

I have inherited an application that stores data in multiple tables in Microsoft Access; the Access DB is only used for storage, all data processing is handled by the app (VB.net). Is this good ...
1
vote
2answers
123 views

How to store historical user data?

I'm trying to think of fine way to store historical data for my web application. The application has users that add photos, comment and grade them. All this is stored in relational database. The ...