March 31, 2010 at 8:37 pm
I was installing the AdventureWorks Sample Database and noticed something interesting: The installer Creates the tables using CREATE_TABLE, then loads data, THEN adds the primary keys for each of the table using ALTER_TABLE. Just a question from a newbie: isn't the logical order of things to first create the table, assign the primary key and THEN load the data? Why is the data loaded before assigning primary keys. Any idea?
April 1, 2010 at 1:59 pm
I have seen people following that path when building a test environment where they are certain about the quality of the data.
Rationale behind is that building PKs/FKs afterwards - with novalidate option - is much faster.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply