![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
Ed Prochak wrote: H5N1 wrote: thanks one more thing, then. what would be the easiest way to keep information about current year? I say year, but rather it would be an ID of some more general BudgetPeriod table row. PET PEEVE WHY DO YOU THINK YOU NEED A PSEUDOKEY FOR A TIME PERIOD?? /PET PEEVE Hopefully you have modeled that out. A pseudokey isn't always bad (it's just a bad first choice in a relational database). why is it bad first choice? Isn't it basis of any normalization? |
|
I was just thinking about possibility of adding some additional information a later bout each time period, but I can do it in seperate table without any relationships. There's really two basic ways to do this. One is generating the budget summary as needed (ie from the raw data). So your budget table gives the date range and you compute this on the fly. The other keeps summary numbers so thay can be reported immediately. I think you can see there are advantages and disadvantages to both. Should I add bool CURRENT column to this table and add constraints to check, whether only one row has it set to TRUE? yech! Wouldn't the current period be the current period based on date/time?? This seems a bad choice. yes, bad choice. I was thinking about manual period switching (ie. by user) when the budget is complete. so, I guess I should place the information about it in some bool "current" row in time periods table, with unique constraint on "true" value on that row. |
#12
| |||
| |||
|
|
Ed Prochak wrote: H5N1 wrote: thanks one more thing, then. what would be the easiest way to keep information about current year? I say year, but rather it would be an ID of some more general BudgetPeriod table row. PET PEEVE WHY DO YOU THINK YOU NEED A PSEUDOKEY FOR A TIME PERIOD?? /PET PEEVE Hopefully you have modeled that out. A pseudokey isn't always bad (it's just a bad first choice in a relational database). why is it bad first choice? Isn't it basis of any normalization? |
![]() |
| Thread Tools | |
| Display Modes | |
| |