Database normalization and duplicate values

Posted by bretddog on Stack Overflow See other posts from Stack Overflow or by bretddog
Published on 2011-01-16T07:37:53Z Indexed on 2011/01/16 7:53 UTC
Read the original article Hit count: 190

Filed under:
|
|
|
|

Consider a Parent / Child / GrandChild structure in a database table schema, or even a deeper hierarchy. These being in the same aggregate. One table DAYS keeps a single row per day, and has a "Date" field. This is the root table, or maybe a child of the root. No row can ever be deleted in this table.

In this case, however complex my table schema looks like, however far away in the hierarchy any other table is, is there any reason why any other table would hold a Date value? Can't it instead just have a FK to the DAYS table.

I obviously assume that the creation of these date fields happen not before such datefield exist in the DAYS table.

I'm now thinking just about the date part to be relevant, not the time part. Not sure if all databases can store these individually. That's maybe relevant, but not really the focus of the question.

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql