|
Archives of the TeradataForumMessage Posted: Mon, 07 Jul 2003 @ 20:08:22 GMT
Assuming a query written against Base will always use the Base begin\end dates. It sounds like a reporting requirement exists which currently isn't in your model. This requirement states that for certain claims, use Base's begin\end dates, and for all other claims, use Line's begin\end dates; therefore, a third table needs to be created. This table contain 2 columns (Claim# and BaseOrLine begin\end date Indicator.) With this new table joined to Line and Base table, you could produce a view which dynamically derives the appropriate begin\end dates for reporting using some case logic...of course, performance might not be acceptable. So, if performance is a concern, you should be able to use your new table to create a denormalized table containing the PrimaryKey of Lines plus the appropriate begin\end date for reporting. As long as you ensure the primary key of this new table is the same as the Lines table, then, hopefully, performance won't be so bad. Either way, a new table containing Claim# and BaseOrLine begin\end data Indicator needs to be modeled. As to how you use this information (3NF versus denormalization) for reporting depends on your performance requirements. Hope this helps, Clay
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||