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
4answers
398 views

(Dis)advantages of datetime vs. long in globally used applications [closed]

I am currently designing a web/mobile application the bulk of whose users will be distributed across the different U.S. time zones with a potential of scaling up to other countries and time zones as ...
8
votes
7answers
722 views

Design Parts DB

I'm developing a tool that handles (electrical) parts. The parts can be created, viewed, modified, deleted, grouped and so on... In order to make this question useful for future visitors I like to ...
1
vote
2answers
1k views

Alternatives to sql like databases [closed]

These days computers usually have 2GB or 4GB memory. I like to use some secure client server model, and well an sql database is likely candidate. On the other hand I only have about 8000 records, ...
1
vote
1answer
333 views

Storing revisions of a document

This is a follow up question to my original question. I'm thinking of going with generating diffs and storing those diffs in the database 'History' table. I'm using diff-match-patch library to ...
2
votes
2answers
6k views

When should we use weak entities when modelling a database?

This is basically a question about what are weak entities? When should we use them? How should they be modeled? What is the main difference between normal entities and weak entities? Does weak ...
1
vote
1answer
631 views

NoSQL as file meta database

I am trying to implement a virtual file system structure in front of an object storage (Openstack). For availability reasons we initially chose Cassandra, however while designing file system data ...
3
votes
1answer
266 views

Database Schema Usage

I have a question regarding the appropriate use of SQL Server database schemas and was hoping that some database gurus might be able to offer some guidance around best practice. Just to give a bit of ...
18
votes
2answers
6k views

self referencing tables, good or bad?

Representing geographical locations within an application, the design of the underlying data model suggests two clear options (or maybe more?). One table with a self referencing parent_id column uk - ...
-1
votes
3answers
709 views

What makes Java so suitable for writing NoSQL Databases

Looking at this page that aggregates the current NoSQL landscape, one can see that the majority of these projects are written in Java. Databases are complex systems software dealing with the file ...
12
votes
8answers
929 views

Are there examples of non CRUD approaches?

I'm a programmer but also have worked as an archivist. As archivist it's a lot about keeping data. I often get into arguments with colleagues when it comes to operations on data. I don't like the U ...
4
votes
2answers
902 views

Which design better when use foreign key instead of a string to store a list of id

I'm building online examination system. I have designed to table, Question and GeneralExam. The table GeneralExam contains info about the exam like name, description, duration,... Now I would like to ...
2
votes
1answer
401 views

Designing persistence schema for BigTable on AppEngine

I have tried to design the datastore schema for a very small application. That schema would have been very simple, if not trivial, using a relational database with foreign keys, many-to-many ...
4
votes
3answers
669 views

Set modified date = created date or null on record creation?

I've been following the convention of adding created and modified columns to most of my database tables. I also have been leaving the modified column as null on record creation and only setting a ...
2
votes
2answers
235 views

how to model this relationship ? in ERD

I have three entities : Technician Vehicle Repair The question is how to model this in ERD? Knowing that a technician can repair multiple cars, and the same car can be repaired by one and only one ...
0
votes
4answers
398 views

Is data integrity possible without normalization?

I am working on an application that requires the storage of location information such as city, state, zip code, latitude, and longitude. I would like to ensure: Location data is accurate Detroit, ...
5
votes
4answers
267 views

Where ORMs blur the lines between code and data, how do you decide what logic should be a stored procedure, and what should be coded?

Take the following pseudocode: CreateInvoiceAndCalculate(ItemsAndQuantities, DispatchAddress, User); And say CreateInvoice does the following: Create a new entry in an Invoices table belonging to ...
1
vote
3answers
3k views

Storing Attendance Data in database

So i have to store daily attendance of employees of my organisation from my application . The part where I need some help is, the efficient way to store attendance data. After some research and brain ...
2
votes
2answers
169 views

Best approach for saving highlighted areas on geographical map

I am designing an application that allow users to highlight areas of a geographical map using a tool that is like brush or a pen. The tool basically draw a circle with a single click and continue ...
8
votes
1answer
747 views

Classless tables possible with Datamapper?

I have an Item class with the following attributes: itemId,name,weight,volume,price,required_skills,required_items. Since the last two attributes are going to be multivalued, I removed them and ...
6
votes
5answers
2k views

Predicting advantages of database denormalization

I was always taught to strive for the highest Normal Form of database normalization, and we were taught Bernstein's Synthesis algorithm to achieve 3NF. This is all very well and it feels nice to ...
2
votes
1answer
715 views

Architecture for Social Graph data that has a Time Frame Associated?

I am adding some "social" type features to an existing application. There are a limited # of node & edge types. Overall the data itself is relatively small (50,000 - 70,000 for each type of ...
4
votes
2answers
2k views

Document-oriented vs Column-oriented database fit

I have a data-intensive application that desperately needs a database make-over. The general data model: There are records with RIDs, grouped together by group IDs (GID). The records have arbitrary ...
5
votes
4answers
234 views

Should I comment Tables or Columns in my database?

I like to comment my code with various information, and I think most people nowadays do so while writing some code. But when it comes to database tables or columns, I have never seen anyone setting ...
0
votes
2answers
1k views

Fitting it together, database, reporting, applications in C#

Introduction Preamble I was hesitant to post this, since it's an application whose intricate details are defined elsewhere, and answers may not be helpful to others. Within the past few weeks (I was ...
1
vote
1answer
305 views

Breaking 1NF to model subset constraints. Does this sound sane?

My first question here. Appologize if it is in the wrong forum but this seems pretty conceptual. I am looking at doing something that goes against conventional wisdom and want to get some feedback ...
11
votes
5answers
5k views

Configuration data: single-row table vs. name-value-pair table

Let's say you write an application that can be configured by the user. For storing this "configuration data" into a database, two patterns are commonly used. The single-row table CompanyName | ...
9
votes
11answers
18k views

Using XML as data storage

I was thinking about the XML format and the following quote: “XML is not a database. It was never meant to be a database. It is never going to be a database. Relational databases are proven ...
4
votes
2answers
326 views

Proper Data Structure for Commentable Comments

Been struggling with this on an architectural level. I have an object which can be commented on, let's call it a Post. Every post has a unique ID. Now I want to comment on that Post, and I can use ...
0
votes
2answers
342 views

The limit of Int32 for Identity Column

This is just a consideration for a site am creating and for other big sites out there. I am using Identity Column to store the ID of some of my tables and I have classes whose Id are decorated with ...
0
votes
2answers
310 views

Does there exist a design-pattern for this problem?

I have a big database of data which we can consider today's system. The data has a web front-end which allows my users to update the data. Let's call this "original solution" When new users come in ...
0
votes
1answer
172 views

Would this data requirement suit a Document -Oriented database?

I have a requirement to allow users to fill in journal/diary entries per day. I want to provide a handful of known journal templates with x columns to fill in. An example might be a thought diary; a ...
4
votes
3answers
682 views

Which aspect of normal forms do entity-attribute-value tables violate, if any?

I'm not asking if EAV tables are good or bad. I'm wondering if they are considered "normalized", and if not, why? If they aren't normalized, which normal form are they violating and why?
23
votes
9answers
2k views

How do you organize highly customized software?

I'm working on a large software project which is highly customized for various customers arround the world. This means that we have maybe 80% code which is common between the various customers, but ...
2
votes
3answers
393 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
124 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
880 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
380 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
111 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
799 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 ...
1
vote
1answer
949 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
686 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
299 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
194 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
202 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
117 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
345 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
4answers
700 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 ...
55
votes
12answers
44k 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
149 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 ...