Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Design question

Author  Topic 

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2009-01-09 : 14:53:48
Greetings,

What design approach do you suggest for a Capacity Plannig tool I have to develop with the following items that pretty much stay constant ..shoudl I create a table syDefinitions with the field names below and refer them to do my calculations, or put tthem in an XML field (<SystemDefinitions><LoadTime></LoadTime></SystemDefinitions>) to prevent someone from mistakenly changing a field value which is refered in code?

Load Time
Set-Up Time
Unload Time
Expected Process Time
Throughput
Capacity

Thanks a lot

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-01-12 : 04:51:05
If I understand you right the values would not change often for the fields shown above. But is there a chance they may sometime? If they change should the new values be used when looking at historical data or just to data from the date of change?
A small table with fields shown and a column or columns to show when the values are valid would cope with future change e.g Date_valid_To, Date_valid_From.
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2009-01-12 : 10:55:36
dd yes you are exactly correct..!!! when the values change we will be adding new records so as not to affect historical data..otherwise the historical data would be skewed...what you mention is exactly correct.
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-01-12 : 11:38:22
Glad to help - you could set the default value of the "valid_From" column to getdate() so inserted rows would automatically have that day's date in that column, unless a different value is entered.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-12 : 12:26:29
and a trigger to correctly audit changes in main table and update date values appropriately
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2009-01-12 : 13:08:32
v so the trigger would be dumping data somewhere else an audit table or just update it as dd says.

appreciate your talented inputs guys/gals!
Go to Top of Page
   

- Advertisement -