January 26, 2012 at 11:30 am
We have a database, it is like a staging database worked kind of like Dataware house for a department of Reasearch and Evaluation. We get the data from students information system, they generate quite a few flat files from students system, we load into the database.
My questions is do we need to add primary or forign keys to these tables.
Or just load the data in, to follow what they have in the source flat files.
The flat source file should already take these into consideration in most cases because they are all from one student system.
For example, students table may have a birth country code, do I need to add a forign key to reference countycode in the country table?
Thanks
January 26, 2012 at 11:51 am
For staging tables? Typically I include a primary key just to be sure I have unique data or at least a unique reference to a single row but I don't do foreign keys on staging tables. Once that data is loaded into the primary tables I would expect there to be primary keys and foreign keys there..
CEWII
January 26, 2012 at 11:53 am
Thank you, I got it.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply