Re: Checking data consistency in the context of from-to-dimensions
Date: Tue, 30 Jun 2009 13:47:47 -0300
Message-ID: <4a4a41b5$0$23754$9a566e8b_at_news.aliant.net>
Philipp Post wrote:
>>Snodgrass has an earlier book length treatment of the topic in SQL.<
>
> This book is available at the site of university of Arizona for
> download
>
> http://www.cs.arizona.edu/~rts/tdbbook.pdf
>
> Other books also cover temporal data in some chapters, such as Joe
> Celko's SQL for Smarties.
Except that Joe is an idiot. One reads his nonsense at one's own risk.
> The general patter I know off is having <something>_start_date and
> <something>_end_date. NULL in the end_date means current. That makes
> it easy to get the current data, for what you could build a view.
NULL anywhere is a really dumb idea. Why not check out the theoretical work that has already been done instead of making uninformed observations?
> Regarding data integrity the following comes to mind (certainly not a
> complete list):
> - CHECK(start_date < end_date)
> - regarding overlaps you could say, that the new start_date or
> end_date is not allowed to be between the existing start_date and
> end_date pairs applicable.
But that doesn't even begin to deal with the declarative constraints for the normal requirements of full coverage, adjacency and non-overlap. Received on Tue Jun 30 2009 - 18:47:47 CEST