Re: Impossible Database Design?

From: Kenneth Downs <knode.wants.this_at_see.sigblock>
Date: Tue, 16 May 2006 13:13:39 -0400
Message-Id: <nrdpj3-8vl.ln1_at_pluto.downsfam.net>


Nikolai Onken wrote:

> Hey,
>
> I was just wondering if it is possible to create a database design
> where you can have
>
> 1. Infinite repeating events like "every year, every last monday,..."
>
> 2. The possibility to test whether events overlap other events
>
> I would say it is not possible since I would need to run an infinite
> query to catch a singular event..
> Any ideas?
> What would be the 'nearest' approach?
> Cheers,
>
> Nikolai

To answer part of your question, overlapping events can be handled with a constraint.

In fact, you can can consider a conventional unique constraint to be a simplified case of a generalized exclusion constraint. The more general case can provide various rules that determine which rows exclude others, in the case of the unique constraint it is simple equality, in the case of time it is interval overlap.

-- 
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth_at_(Sec)ure(Dat)a(.com)
Received on Tue May 16 2006 - 19:13:39 CEST

Original text of this message