Re: Dreaming About Redesigning SQL

From: Bob Badour <bbadour_at_golden.net>
Date: Sat, 25 Oct 2003 10:20:03 -0400
Message-ID: <ICqdnV62UPJLGweiU-KYiw_at_golden.net>


"Marshall Spight" <mspight_at_dnai.com> wrote in message news:kMmmb.21671$Fm2.11400_at_attbi_s04...
> "Mike Preece" <michael_at_preece.net> wrote in message
news:1b0b566c.0310240634.24c30c30_at_posting.google.com...
> >
> > Can you tell me what exactly is the function of the central integrity
> > enforcement in the DBMS for a single table with no parent and no
> > child? What is required to be done in order to maintain integrity in
> > this case?
>
> Sure. Note that the complexity of the schema is independent
> of the need to enforce integrity centrally. (Although it is
> likely that the more complex the schema, the more
> integrity rules there will be.)
>
> Also note that you've left it up to me to come up with a
> specific example, so I will.
>
> Let's say you've got a hotel room booking table that
> participates in no relationships with any other table.
> (This example is somewhat artificial, but I'll try to
> make it as real as possible.)
>
> Uh, attributes, let's see:
>
> create table bookings
> (
> RoomNumber int, -- the room number at the hotel
> CreditCardNumber varchar(16), -- the credit card number to reserve the
room
> Name varchar(200), -- the customer's name
> StartDate datetime,
> EndDate datetime,
> Occupants int, -- together with StartDate, determines price
> AmountCharged float -- float is a terrible choice for currency in the real
world
> )
>
> Integrity constraints are relevant everywhere we have
> an application that *updates* the database. If we
> just want to read, no big deal.

If we just want to read, we still need to know the data types and relation headings at a minimum. Received on Sat Oct 25 2003 - 16:20:03 CEST

Original text of this message