Re: Second Normal Form help.

From: Alex Bruzzone <bruzzone_at_rideau.carleton.ca>
Date: 13 Apr 2001 14:44:06 GMT
Message-ID: <9b73bm$c00$1_at_bertrand.ccs.carleton.ca>


I teach a course on Database Analysis and Design to third year undergraduate Business students minoring in IS. It's a required course because of the fundamental role that databases plays in IS.

The course focuses on the importance of data modeling. Learning how to build ER diagrams (Entity-Relationship diagrams) and to translate them into Relational tables is an important part of the course. Students learn about dependent and independent entities, which is particularly relevant to your problem.

The way you have modeled you database, the entity GARAGE is dependent on the entity BUILDING. This is why the pk from BUILDING is part of the pk of GARAGE. Without knowing, you have modeled GARAGE as a dependent entity of BUILDING. In class I use the example of BUILDING and OFFICE. If OFFICE is a dependent entity, then part of the pk of OFFICE will be the BUILDING's pk. In your case, GARAGE is a dependent entity so the "garage number" is unique only within a building. If you make GARAGE an independent entity, "garage Number" woould be unique throught all buildings.

Data Modeling is very useful, and if done properly, you can forget about worrying about violating the Normal Form rules.



Alex Bruzzone
Email address: bruzzone_at_ccs.carleton.ca http://www.carleton.ca/~bruzzone/
Received on Fri Apr 13 2001 - 16:44:06 CEST

Original text of this message