Database & SQL

Moderators: None (Apply to moderate this forum)
Number of threads: 1194
Number of posts: 2247

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Third Normal Form ERD Posted by Lynce on 23 Feb 2012 at 1:59 PM
Hello,

I am designing a ERD on the Third Normal Form for a database and I have a problem.

I can't seem to do is join the People table with the Competitions table as for the Third normal form ERD I can't have any Many-To-Many relationships, only 1-to-Many or 1-To-1 and the task that I'm doing states that:

"Any person can enter more than one competition. A recording of which person enters which competition(s) should be kept in the database. The person is then given a number which indicates in which order the people compete in one particular competition."

So in that case: A person can be in MANY competitions and a competition can(has to) have MANY people - Many-To-Many.. Can't figure out how to get that into One-To-Many.

Oh and yes, I am a student and yes this is my coursework. I am not looking for people to do my work for me as I do want to learn, this is only a really small bit of the draft ERD that I have been stuck on for quite alot of time and can't seem to figure out.

I have attached this bit of my draft ERD in a word document any help would be great, thanks!

Attachment: 3NM ERD.zip (26839 Bytes | downloaded 121 times)
Report
Re: Third Normal Form ERD Posted by Devoquality on 17 Apr 2012 at 3:03 PM
Before i start telling you what to do there are one or two things you should take a look at. Like, according to rules table names should be singular. so it would be 'competition' and not 'competitions' etc. . .

You are going to have to make a composite table between people and competitions (this is just another table between the two). Usually the easiest way to name it will be taking the two names of the two many to many relational tables and calling it that. So, for instance you could call it 'person competition'. then you will therefore have a one to many relationship from person to person competition, (ID will therefore become a FK in this new table). and then you will also have a one to many relationship from competitions to person competition and therefore this new table will also have competitionID in it.

This will solve your problem, as the new table will show the competitionID and the person(ID) that takes part in that particular competition.

I dont know what your case study says but unless it says a competition has only one sponsor and a sponsor can sponsor many competitions, then usually a competition can have many sponsors. So you would have a composite table betweeen these two aswell.

Looking at the date you posted this, i guess my reply is a bit late. . .
Report
Re: Third Normal Form ERD Posted by Devoquality on 17 Apr 2012 at 3:06 PM
Before i start telling you what to do there are one or two things you should take a look at. Like, according to rules table names should be singular. so it would be 'competition' and not 'competitions' etc. . .

You are going to have to make a composite table between people and competitions (this is just another table between the two). Usually the easiest way to name it will be taking the two names of the two many to many relational tables and calling it that. So, for instance you could call it 'person competition'. then you will therefore have a one to many relationship from person to person competition, (ID will therefore become a FK in this new table). and then you will also have a one to many relationship from competitions to person competition and therefore this new table will also have competitionID in it.

This will solve your problem, as the new table will show the competitionID and the person(ID) that takes part in that particular competition.

I dont know what your case study says but unless it says a competition has only one sponsor and a sponsor can sponsor many competitions, then usually a competition can have many sponsors. So you would have a composite table betweeen these two aswell.

Looking at the date you posted this, i guess my reply is a bit late. . .
Report
Re: Third Normal Form ERD Posted by Devoquality on 17 Apr 2012 at 3:07 PM
Before i start telling you what to do there are one or two things you should take a look at. Like, according to rules table names should be singular. so it would be 'competition' and not 'competitions' etc. . .

You are going to have to make a composite table between people and competitions (this is just another table between the two). Usually the easiest way to name it will be taking the two names of the two many to many relational tables and calling it that. So, for instance you could call it 'person competition'. then you will therefore have a one to many relationship from person to person competition, (ID will therefore become a FK in this new table). and then you will also have a one to many relationship from competitions to person competition and therefore this new table will also have competitionID in it.

This will solve your problem, as the new table will show the competitionID and the person(ID) that takes part in that particular competition.

I dont know what your case study says but unless it says a competition has only one sponsor and a sponsor can sponsor many competitions, then usually a competition can have many sponsors. So you would have a composite table betweeen these two aswell.

Looking at the date you posted this, i guess my reply is a bit late. . .
Report
Re: Third Normal Form ERD Posted by Devoquality on 17 Apr 2012 at 3:16 PM
Before i start telling you what to do there are one or two things you should take a look at. Like, according to rules table names should be singular. so it would be 'competition' and not 'competitions' etc. . .

You are going to have to make a composite table between people and competitions (this is just another table between the two). Usually the easiest way to name it will be taking the two names of the two many to many relational tables and calling it that. So, for instance you could call it 'person competition'. then you will therefore have a one to many relationship from person to person competition, (ID will therefore become a FK in this new table). and then you will also have a one to many relationship from competitions to person competition and therefore this new table will also have competitionID in it.

This will solve your problem, as the new table will show the competitionID and the person(ID) that takes part in that particular competition.

I dont know what your case study says but unless it says a competition has only one sponsor and a sponsor can sponsor many competitions, then usually a competition can have many sponsors. So you would have a composite table betweeen these two aswell.

Looking at the date you posted this, i guess my reply is a bit late. . .



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.