Reputation
8,000
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 13 27
Newest
 Good Answer
Impact
~234k people reached

Dec
24
awarded  Nice Answer
Dec
20
comment library data modeling
@HyunSULee - You're welcome. Feel free to click the check mark to indicate that you accept my answer.
Dec
19
answered library data modeling
Dec
14
comment Relation between first name and last name
See my answer to this similar question: dba.stackexchange.com/questions/65808/…. There is a difference between coincidental occurrence and relationships.
Nov
30
revised How to find functional dependancies from a relational schema?
grammar and spelling.
Nov
30
answered How to find functional dependancies from a relational schema?
Nov
20
comment Database design: Two 1 to many relationships to the same table
@AmadeoGallardo The answer is "it depends". Querying against a key is always pretty efficient, since you can generally count on an index scan at least, if not a seek, and these are quick operations. The issue becomes when you query across both keys in the two foreign keys solution. Here you're asking the query optimizer to do an either/or operation. At best this will double the cost of the query, usually a little worse, since you have to query against one key, then the other, then merge the results.
Nov
17
comment Should I create a child table without primary key?
It's hard to understand why you don't think you need a unique key. Please explain why your primary key isn't just the combination of receipt_id, prod_id and coupon_id. It looks like what you're getting at is this being a compound primary key. Are you asking whether you need to add a surrogate key?
Oct
27
answered Database modelling : Creating a model for restaurant application which gives statistics
Sep
30
comment Table naming and Database normalization
A contrary opinion to the answer you accepted: stackoverflow.com/questions/11756610/table-column-name-design/…
Sep
24
awarded  Nice Answer
Sep
11
comment Should I split my tables into different tables when all of the data is dependant on the primary key?
Indirectly dependent is not dependent. Can different license codes with the same product IDs have different product names? If not then product name is not dependent on the license code. Go read en.wikipedia.org/wiki/Database_normalization and try to understand the basic normal forms, especially third normal form.
Sep
5
answered Database design for a blogging site
Aug
31
answered Entity relationship problem
Aug
28
awarded  Yearling
Aug
16
comment Storing resource information efficiently
Is this really a big problem? It seems to me the most complicated part is working out the display of items stored as date ranges, which you've obviously done already. For splitting/recombining existing records when changes are made, it seems to me you just have to find all of the overlapping records and either update them or delete them, depending on whether they overlap or are fully contained within the range being "updated" by the user. See stackoverflow.com/questions/20177304/… for how to find date range overlaps.
Aug
14
comment Normalization for postal addresses in US (address, county, city, state, zipcode)?
There is no point in normalizing ZIP codes. Normalization is for data integrity, not for lookup efficiency. There are no facts that are important to an address that are fully functionally dependent on a ZIP code, therefore there is no reason to create a table with ZIP code as its primary key. An index on ZIP is more than adequate for making retrieval by ZIP Code quick.
Aug
14
comment Normalization for postal addresses in US (address, county, city, state, zipcode)?
City and ZIP are many-to-many. Some ZIP codes cover huge areas and some cover a single door.
Aug
3
awarded  Constituent
Jul
28
awarded  Caucus