|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 1:35 AM
Points: 4,789,
Visits: 1,336
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, December 20, 2012 1:07 PM
Points: 15,
Visits: 166
|
|
Thank u all for ur support. I ll keep in mind ur suggestions in my next article.
My next article will be on "Faster extraction and loading in SSIS package"
Encourage me for better output. :)
Thank you
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 11:47 PM
Points: 356,
Visits: 700
|
|
ALZDBA (2/10/2009) - abbreviated - As always, adding default values for columns is something that depends on the needs of your data model ! If your DA agreed on only having defaults defined for some columns and a DBA wants to add them anyways, he (the DBA!) should give that feedback to the DA and get it approved !
With your staging db, rules may defer from the actual OLTP db because you are preparing stuff for later purposes. Then adding defaults may ease tool usage to load data into a DWH, because in many cases NULL isn't an option. -- Keep in mind, when adding a default value, it doesn't alter the actual current content of the column !
Hope this question does not need its own thread ... Data warehousing practitioners seem to have a constraint on EVERY single column. The above code will only preserve necessary constraints, but needs doing before the table was (re)populated, thus each constraint will be checked for each row during the extraction.
DBA types think it is better to import the data into the table, then run an UPDATE script on each column that essentially needs to be set (e.g. Update tblRepopulated SET thisColumn = 0 where thisColumn IS NULL).
Which practice is more efficient with large data volumes?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 2:17 AM
Points: 6,862,
Visits: 8,049
|
|
|
|
|