Re: Second Normal Form help.

From: Tom <Tom_at_webartisan.com>
Date: Thu, 29 Mar 2001 15:08:01 -0500
Message-ID: <9a04n7$nfo$1_at_bob.news.rcn.net>


.... If the BuildingId
 was primary and unique throughout ...

I meant GarageNumber. Sorry.

>
> ...thats what you were asking, right?
>
> -tom
>
>
> James_one <James_one_at_deja.com> wrote in message
> news:GoMw6.271821$65.1466316_at_news1.rdc1.fl.home.com...
> > Here is a simplified version of a model I'm working on.
> > Buildings have many garages, and the garages can hold 1 or more trucks:
> >
> >
> > CREATE TABLE Buildings (
> > BuildingID int NOT NULL Primary Key ,
> > BuildingName char (20) NOT NULL )
> >
> > CREATE TABLE Garages (
> > BuildingID int NOT NULL REFERENCES Buildings(BuildingID),
> > GarageNumber int NOT NULL ,
> > Width int NOT NULL ,
> > Length int NOT NULL ,
> > Height int NOT NULL,
> > PRIMARY KEY (BuildingID, GarageNumber)
> > )
> >
> > CREATE TABLE Trucks (
> > VIN char (20) NOT NULL Primary Key,
> > TruckCapacity int NOT NULL ,
> > BuildingID int NOT NULL ,
> > GarageNumber int NOT NULL,
> > FOREIGN KEY
> > (BuildingID,GarageNumber)
> > REFERENCES Garages (BuildingID,GarageNumber)
> > )
> >
> >
> > My question is about the garages table. Is it in second normal form?
> > I mean do the dimensions(height width and length) of the garage depend
 on
> > the whole primary key of garages or just the garage number?
> >
> > Thanks in advance.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
Received on Thu Mar 29 2001 - 22:08:01 CEST

Original text of this message