Re: Second Normal Form help.

From: Tom <Tom_at_webartisan.com>
Date: Thu, 29 Mar 2001 15:39:11 -0500
Message-ID: <9a06hm$1u0$1_at_bob.news.rcn.net>


Sure, Its valid in first normal form. To be in second normal form, all non-key attributes need to be functionally dependant on the entire key, not key combinations.

James_one <James_one_at_deja.com> wrote in message news:WUMw6.271824$65.1466583_at_news1.rdc1.fl.home.com...
> Is that not a valid primary key, the combination of BuildingID and
> GarageNumber?
>
>
> "Tom" <Tom_at_webartisan.com> wrote in message
> news: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:39:11 CEST

Original text of this message