For questions about structuring the data within a database. How to lay out tables, whether to use a relational DB or not, etc.

learn more… | top users | synonyms

2
votes
3answers
362 views

Application Logic Vs DB Triggers for database cleaning

When cleaning out old data from a set of database tables, is it safer to have the logic in the application or in a database trigger? I am upgrading an application that I wrote a while back (and in a ...
1
vote
4answers
1k views

When using Hibernate can we forget about Database Design?

We started (just me and my friend) working on a website. As a part design phase we have finished the drawing a Site Map, decided on the content in each of the web page and the navigation. As we want ...
0
votes
3answers
123 views

User management data - the need for a username and password

I would have this asked on StackOverflow if it had code, but it's more on the idea/concept so I asked here. I am working on the UI of our inventory system when I found out that when registering a ...
0
votes
2answers
818 views

Is it reasonable to use POCO's that inherit from DTO's?

I'm designing a tiered .NET application, and I want to use the Code First approach. I'm new to this, so I'm struggling to envision how it ought to be designed. Would the following be a reasonable ...
2
votes
3answers
366 views

What's a better name for this many-to-many table?

Part of one of my applications has contracts and contract_types tables, wherein a type may have many contracts but a contract may only be of one type. Now a new wrinkle has been introduced: a contract ...
1
vote
2answers
110 views

Cataloging events, projects and tasks: Is SQL appropriate?

I have this idea for a database: it would hold everything I "need to remember", and allow future coding projects to access the information. These future projects include a day-planner and historical ...
1
vote
1answer
780 views

Modular Database Structures

I have been examining the code base we use in work and I am worried about the size the packages have grown to. The actual code is modular, procedures have been broken down into small functional (and ...
0
votes
1answer
922 views

Design Pattern for Complex Data Modeling

I'm developing a program that has a SQL database as a backing store. As a very broad description, the program itself allows a user to generate records in any number of user-defined tables and make ...
16
votes
7answers
675 views

De-facto standards for customer information record [closed]

I'm currently evaluating a potential new project that involves creating a DB for typical customer information (userid, pwd, first & last name, email, adress, telfnr ...). At this point, ...
2
votes
3answers
295 views

Should each app have its own database, or should small apps be merged into one? [duplicate]

Possible Duplicate: Should I use one database per application or share a single database amongst multiple applications We have a bunch of small to medium sized apps, each of which has its ...
0
votes
2answers
187 views

What are the benefits of using geospatial datatypes?

We currently store points as three floats (lat,lon,alt) and support only one type of query (points within a given radius) but look forward to support more queries. We are using PHP and MySQL. What ...
2
votes
1answer
196 views

Database structure for various items

I'm building a sqlite database for an android app which will hold a list of items, each of which have different characteristics. Some of the characteristics are available for all objects, some are ...
0
votes
1answer
116 views

Moving dozens of existing standalone retail sites to one central inventory database: what should I know going in? [closed]

This will be the first project of this scale that I have attempted, and the first time I have run a website at all (much less dozens) using an off-site database. In particular, I'd like to know: ...
1
vote
2answers
344 views

Centrally managing 100+ websites without bankrupting a small company [closed]

I'm mainly interested in opinions on the trade-offs between having a single central server all the websites connect to as opposed to each website mirroring a subset of the master database with all the ...
0
votes
5answers
685 views

Do I need to add an index on a table with one row?

I'm creating a parameter table in our database. This table will have 1 row with values that are environment specific (production, development, etc). Is there any reason why I should define an index ...
54
votes
12answers
38k views

Is it a bad practice to store large files (10 MB) in a database? [closed]

I am currently creating a web application that allows users to store and share files, 1 MB - 10 MB in size. It seems to me that storing the files in a database will significantly slow down ...
0
votes
1answer
146 views

Parameterized Django models

In principle, a single Django application can be reused in two or more projects, providing functionality relevent to both. That implies that the same database structure (tables and relations) will be ...
2
votes
2answers
3k views

Booking system (Handle working hours, Get available time slots) [closed]

I'm currently working on a time booking system for a friends hair salon. The plan is to try to keep it as simple as possible. The user view (where the owner see the booked appointments) is more or ...
5
votes
5answers
2k views

Two database fields for date and time - should they be merged?

In the following question, field and table names have been changed to protect their identities. If I have two database columns: MONKEY_DATE DATETIME NULL (with data e.g. 2012-05-14 00:00:00.000) ...
8
votes
4answers
2k views

Design Patterns / Strategies For Custom Fields & Data Types

Are there any common strategies or design patterns for designing applications that have either the ability to add custom fields to data objects, or for creating your own custom definition of objects. ...
14
votes
1answer
6k views

When should you use a document vs relational vs graph database? [closed]

For the purposes of discussion let's consider a FourSquare scenario. Scenario Entities: Users Places Relationships: Checkins: users <-> places, many to many Friends: users <-> users, ...
3
votes
3answers
888 views

A Huge Database: Picking the right schema and data model

We want to store some genomic variant data but there are some problems, more important ones like problem of the data's immense size and variability. Variant data can be huge. For example, a single ...
3
votes
3answers
196 views

Database architecture decisions

I do not know too many things about databases, so a lot of questions concerning architecture came up lately. Two of these things are: If I have a table with a lot of entries(millions probably), how ...
13
votes
5answers
1k views

Is it the job of programmers to design the database?

I've been a programmer for the past six years. Throughout my career, I have worked on many web applications. Most of the time, when a database was needed, it was given to us (the programmers) or we ...
3
votes
2answers
7k views

How to correctly design NoSql database schema? [closed]

I would like to learn something more about NoSQL databases, so I've chosen to create a new project from scratch to handle football results. In my traditional relational database, I have tournaments, ...
11
votes
3answers
517 views

When accessing/manipulating complex data, is it better to store it in many small pieces or one large chunk?

I am building a web app that manipulates fairly complex data: guitar tabs. As a reference, guitar tabs look like this: ...
1
vote
4answers
949 views

Web application - database design/infrastructure

I have just begun development of a web application (that will be deployed using Google app engine), without going into the specifics, the web app will allow users to deploy a small website of their ...
1
vote
4answers
972 views

At least one database view per database table-Is this good or bad design and why?

We are building a Windows Mobile based application to interface with a customer's existing web application. We are reading and writing data to the customer's SQL server 2008 database. The customer ...
4
votes
5answers
2k views

Structuring database for multi-object “activity” and “following” functionalities

I am working on a web application which operate with different types of objects such as user, profiles, pages etc. All objects have unique object_id. When objects interact it may produce "activity", ...
7
votes
2answers
822 views

How to separate sensitive data in database(MySql)

I need to design a database that will contains information about personal disease of users. What can be the approach in order to implement the columns of the DB's tables: encrypt the information, ...
5
votes
6answers
1k views

Database Table Prefixes

We're having a few discussions at work around the naming of our database tables. We're working on a large application with approx 100 database tables (ok, so it isn't that large), most of which can be ...
-2
votes
1answer
209 views

Adding a forum to an existing site

I've got a site with ~500 registered members, 300 of which are what you'd call "active". Site data is kept in a MySQL dbase. I'd like to add a myBB forum to the site, but this question applies to any ...
2
votes
5answers
358 views

Do any database “styles” use discrete files for their tables?

I've been talking to some people at work who believe some versions of a database store their data in discrete tables. That is to say you might open up a folder and see one file for each table in the ...
2
votes
3answers
629 views

Designing a large database with multiple sources

I have been tasked with redesigning, or at worst optimising the structure of a database for a data warehouse. Currently, the database has 4 other source databases (which is due to expand to X ...
0
votes
3answers
201 views

Optimal Database design regarding functionality of letting user share posts by other users

I want to implement functionality which let user share posts by other users similar to what Facebook and Google+ share button and twitter retweet. There are 2 choices: 1) I create duplicate copy of ...
2
votes
2answers
103 views

User input and automated input separation

I have a MySQL database and an automation script which modifies the data inside once a day. And these columns may have changed by an user manually. What is the best approach to make the system only ...
7
votes
3answers
5k views

Multi-tenancy - single database vs multiple database

We have a number of clients, whose systems share some functionality, but also have quite a degree of diversity. The number of clients is growing - always a healthy thing! - and the diversity between ...
1
vote
4answers
1k views

What are some good tips for a developer trying to design a scalable MySQL database?

As the question states, I am a developer, not a DBA. I have experience with designing good ER schemas and am fairly knowledgeable about normalization and good schema design. I have also worked with ...
0
votes
3answers
2k views

Best approach for a database of long strings

I need to store questions and answers in a database. The questions will be one to two sentences, but the answers will be long, at least a paragraph, likely more. The only way I know about to do this ...
2
votes
2answers
611 views

What's the best way to modularize a User schema so it's generic

I have a database design question. Basically I want to be able to create a schema for a User model, then use this User model in other models that extend User but I want to design it in such a way that ...
7
votes
2answers
2k views

Should we do entity-relationship modeling or object-oriented modeling first?

When building an application from scratch, should I start with the object-oriented (OO) model or the entity-relationship (ER) model?
2
votes
2answers
1k views

Storing translation data as JSON column

We're deciding on how to store translations of some descriptions of database items. We could go the traditional way and keep a translations table (and a language table and an object_translation ...
2
votes
2answers
119 views

Pattern for group of entities with one required primary member

Given a parent entity with a collection of child entities where there must be exactly one primary child of the group? To make the question more concrete, I've seen a number of ways that this pattern ...
1
vote
3answers
271 views

Are there cases where it is a good idea to disallow remote access to a database?

My coworker is working on a project and decided to have the database subside entirely on the glassfish server with glassfish being the only thing that can directly access the database. He will then ...
11
votes
2answers
338 views

What are the advantages of separating 'result' from 'status'

Let's say you have some automated processes that generally go through the following states; scheduled - initiated - validating - executing - completed On top of that these processes can prematurely ...
5
votes
4answers
243 views

Putting audit functionality into the database

Our database does not have any audit functionality. It does not records who inserts the record or who who changes it It does not keep a history of the changes made Nothing can be restored if ...
1
vote
2answers
113 views

In which format should I sent the values in database in PHP?

I am developing an application which is based on the quiz contest for competetive exams. The user can give different categories of tests, which will contain different types of questions of following ...
1
vote
2answers
154 views

Using a column to store the company or a separate database?

I am writing an system for the company to put their promotion material on the site, which is like some kinds of CMS. So, I need a database that store their data, but I am considering how to store ...
5
votes
8answers
2k views

How to store record statuses (like pending, complete, draft, cancelled…)

Quite a lot of applications require records in their tables to have a status, such as 'complete', 'draft', 'cancelled'. What's the best way of storing these statuses? To illustrate what i'm getting at ...
4
votes
1answer
375 views

Are XML Schemas bad for constantly evolving file formats?

I'm struggling with a client-server project where I have Java apps out on the Internet that store data to a backend server. The format of this data is well-defined, but the project is constantly ...