Re: help with normalization
Date: Fri, 2 Sep 2005 15:46:49 +0200
Message-ID: <43185789$0$10965$ba620e4c_at_news.skynet.be>
COURSE(courseNr{PK}, name,...)
CLASS(ClassNr{PK}, description
ROOM(roomNr{PK},descript,...)
ROSTER(classcode{PK}, courseNr{PK}, teacherNr{PK}, RoomNr{PK}, period{PK})
In the last table I end up with the entire thing being a composite key. I suspect it should be split,
because...how do I control:
- a class can only be in one room in one given period
- a room can only be occupied by one class in a given periuod (the same thing)
- a class can have only one course in a given period
Do I need to split this last table, and how?
thanks again, Jan
"Tonkuma" <tonkuma_at_jp.ibm.com> wrote in message
news:1125667802.811424.40080_at_f14g2000cwb.googlegroups.com...
>I think that you shoud consider to add forein keys and constraints,
> before consider normalization.
> For Example:
>> - a teacher can teach several courses
>
> Add reference to StaffNo(Primary key of Teacher table) to Cource table.
>> Course(CourseNo, description, TeacherNo) (TeacherNo reference StaffNo of
>> Teacher table)
>
Received on Fri Sep 02 2005 - 15:46:49 CEST