Re: attendance DB design

From: Bob Hairgrove <rhairgroveNoSpam_at_Pleasebigfoot.com>
Date: Sat, 21 Sep 2002 13:28:57 GMT
Message-ID: <3d8c73ba.18264713_at_news.ch.kpnqwest.net>


On Sat, 21 Sep 2002 13:06:44 GMT, rhairgroveNoSpam_at_Pleasebigfoot.com (Bob Hairgrove) wrote:

>CREATE TABLE Absentees (
> StudentId LONG NOT NULL,
> Absence DATETIME NOT NULL,
> CONSTRAINT pk_Absentees
> PRIMARY KEY (StudentId, Absence),
> CONSTRAINT pk_Absentees
> FOREIGN KEY (StudentId)
> REFERENCES Students (StudentId));

Sorry, that should be:

CREATE TABLE Absentees (

    StudentId LONG NOT NULL,
    Absence DATETIME NOT NULL,
    CONSTRAINT pk_Absentees

       PRIMARY KEY (StudentId, Absence),

    CONSTRAINT fk_Absentees 
               ^^^^^^^^^^^^
       FOREIGN KEY (StudentId)
       REFERENCES Students (StudentId));


Bob Hairgrove
rhairgroveNoSpam_at_Pleasebigfoot.com Received on Sat Sep 21 2002 - 15:28:57 CEST

Original text of this message