943,907 Members | Top Members by Rank

Ad:
Jan 25th, 2009
0

Is this Normalized???

Expand Post »
I'm designing a database model for a Gallery. Never done Normalization before, I did some research online and came up with these rules, followed it and this is what I came up with. Trying to get to from UNF to 3NF. Are these stages correct? or am I way off... Much Thanks.
Un-Normal Form (UNF)
Owner ( OwnerID, OwnerName, OwnerContact, ArtID, ArtTitle, ArtistName , Exhibtion, ExhibitionTheme)

In order to get to first Normal form I located a primary Key and identified the part key dependencies.
The second table was comprised of a composite key.
Hence, Ist Normal Form
Owner (PK OwnerID, OwnerName, OwnerContact)
Exhibition (FK OwnerID, PK ArtID, ArtTitle, ArtistName , Exhibtion, ExhibitionTheme)


Not sure how to get to 2NF or 3NF,...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jwaldron82 is offline Offline
10 posts
since Nov 2008
Jan 25th, 2009
0

Re: Is this Normalized???

separate Exhibition and Art tables, I think the relation should be many-to-many so you need to use bridge table
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Jan 26th, 2009
0

Re: Is this Normalized???

Click to Expand / Collapse  Quote originally posted by jwaldron82 ...
Un-Normal Form (UNF)
Owner ( OwnerID, OwnerName, OwnerContact, ArtID, ArtTitle, ArtistName , Exhibtion, ExhibitionTheme)
1) First normal form removes repeating items. http://en.wikipedia.org/wiki/First_normal_form Here the repeating items can be OwnerContact (an owner may have a number of different contact details), ArtID (one owner may have may items in an exhibition), ArtistName (it is possible that a number of artists colaborated on the piece of art.)

So the new relationships start to take place.

OWNER
rowid
OwnerName

OWNERCONTACT
rowid
OwnerId (FK to OWNER.rowid)
Contact

ARTITEM
rowid
OwnerId (FK to OWNER.rowid)
Title

ARTIST
rowid
ArtId (FK to ARTITEM.rowid)
Name

EXHIBITION
rowid
ArtId (FK to ARTITEM.rowid)
Theme

Here there is a problem that the EXHIBITION table that grew from the base data contains repeating data (ArtId). So we need to change EXHIBITION and add another table.

EXHIBITION
rowid
Theme

EXHIBIT
rowid
ExhibitionId (FK to EXHIBITION.rowid)
ArtId (FK to ARTITEM.rowid)

2) Second Normal Form http://en.wikipedia.org/wiki/Second_normal_form The data items depend upon the whole of the table key and not part of the key.

So the 2FN for this example is

OWNER
rowid
OwnerName

OWNERCONTACT
rowid
OwnerId (FK to OWNER.rowid)
Contact

ARTITEM
rowid
OwnerId (FK to OWNER.rowid)
Title

ARTIST
rowid
ArtId (FK to ARTITEM.rowid)
Name

EXHIBITION
rowid
Theme

EXHIBIT
rowid
ExhibitionId (FK to EXHIBITION.rowid)
ArtId (FK to ARTITEM.rowid)

3) Third Normal Form http://en.wikipedia.org/wiki/Third_normal_form is a stricter application of the 2FN rules. Here though the data seems to fulfill the 3FN rules as well. So the 3FN form for the given example is shown in the 2FN section.


Simple isn't it.

PCLFW
Reputation Points: 33
Solved Threads: 9
Junior Poster
pclfw is offline Offline
132 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Best design for Many to Many relationship referencing a single table
Next Thread in Database Design Forum Timeline: Sql statement to find records from x to y





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC