From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk> |
Cc: | postgresql sql list <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: diary constraints |
Date: | 2005-08-23 08:58:13 |
Message-ID: | 55E1EB3D-E2CF-41FD-86AD-B39007A48BF9@myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Aug 23, 2005, at 5:33 PM, Gary Stainburn wrote:
> I want to create a courtesy car diary diary system where I have a
> table
> containing all of the cortesy cars in the pool, and then an allocation
> table which has two timestamps, one for the start date/time and one
> for
> the return date/time.
>
> How do I go about creating constraints on inserts and updates to
> ensure
> that
>
> a) the finish is after the start
> b) two allocations for a single vehicle don't overlap.
This is an interesting problem. You might want to take a look at this
book, previously mentioned on the one of the lists (by George Essig,
I believe):
> Developing Time-Oriented Database Applications in SQL
> by Richard T. Snodgrass
>
> The book is out of print, but the author has made the PDF available
> on his website at:
> http://www.cs.arizona.edu/people/rts/tdbbook.pdf
Hope this helps!
Michael Glaesemann
grzm myrealbox com
From | Date | Subject | |
---|---|---|---|
Next Message | Gnanavel S | 2005-08-23 09:00:10 | Re: diary constraints |
Previous Message | neil.saunders | 2005-08-23 08:57:00 | Re: diary constraints |