| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

03-04-10, 22:37
|
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
|
|
|
ERD help.
|
|
I have a few questions on ERD design. If anyone could help me that would be great. I'm not asking for someone to do my homework..I just need some help identifying entities and relationships.
Thanks..
|
|

03-04-10, 22:45
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,516
|
|
Quote:
Originally Posted by smudge1
I have a few questions on ERD design.
|
we're supposed to guess them?
sometimes i crack myself up
|
|

03-04-10, 22:53
|
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
|
|
|
|
Situation.
The state of Georgia is interested in designing a database that will track it's researchers. Info includes researcher name, title, position, university name, location, enrollment, and research interests. Each researcher is associated with only one institution, and each researcher has several research interests.
I know this has to do with cardinality..I'm just having trouble with it.
|
|

03-04-10, 23:12
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,516
|
|
relationship cardinalities are either one-to-one, one-to-many, or many-to-many
1. Each researcher is associated with only one institution
this eliminates the many-to-many relationship
it's a fair guess that an institution has more than one researcher
that would eliminate the one-to-one relationship
2. Each researcher has several research interests.
this eliminates the one-to-one relationship
which of the other two do you think it is?
|
|

03-04-10, 23:25
|
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
|
|
One to many? Are my entities correct...Researcher, Institution, Interests?
|
|

03-04-10, 23:44
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,516
|
|
Quote:
Originally Posted by smudge1
One to many?
|
why do you think this?
Quote:
Originally Posted by smudge1
Are my entities correct...Researcher, Institution, Interests?
|
what's an institution?
|
|

03-04-10, 23:55
|
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
|
|
because each instance relates to one or more instances?
I guess i'm wrong with the entities. Researcher, interests..university?
|
|

03-05-10, 08:31
|
|
Registered User
|
|
Join Date: Jul 2009
Location: Michigan
Posts: 125
|
|
Your entities are Researcher, Interest, and University.
For each University there can be many Researchers.
For each Researcher there can be only one University.
For each Researcher there can be many Interests.
For each Interest there can be many Researchers.
So you will need tables like:
University - UniversityID (primary key), name, etc.
Researcher - ResearcherID (primary key), UniversityID (foreign key to University), name, etc.
Interest - InterestID (primary key), description, etc.
ResearcherInterest - ResearcherID (foreign key to Researcher), InterestID (foreign key to Interest).
The ResearcherInterest table will have a primary key composed of the ResearcherID and InterestID combined to ensure you don't have duplicates. This table will allow the many to many relationship you need between Researcher and Interest.
|
|

03-05-10, 08:38
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,516
|
|
nice one, mark
you just handed him a complete solution for a homework assignment
my philosophy is, we shouldn't do the work for them, but we might guide them through the learning process
i understand the desire to be helpful, but there should be limits...
|
|

03-05-10, 09:11
|
|
Registered User
|
|
Join Date: Jul 2009
Location: Michigan
Posts: 125
|
|
And my philosophy is we should help people not just jerk them around.
If you feel I have done something against the rules of the forum report me and we will let the mods sort it out.
|
|

03-05-10, 10:04
|
|
vaguely human
|
|
Join Date: Jun 2007
Location: London
Posts: 2,519
|
|
Quote:
Originally Posted by MarkATrombley
If you feel I have done something against the rules of the forum report me and we will let the mods sort it out.
|
Mark
Your answers to users questions are always great but the question is whether we should be handing out answers to students. Obviously the idea of homework is to make the student think. If they're just stuck then yes we can, and should, clear up any difficulties for them. If they're just plain lazy then it's up to you how much you want to help but remember you're not doing them any favours in the long term.
Mike (moderator)
|
|

03-05-10, 10:15
|
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
|
|
Thanks for the help. r937 had me thinking last night and got me in the right direction. This was my second ERD. The first one I did after a lot of thinking. It may be wrong but thats what I'm in school for..to learn. Again thank all of you for the help.
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|