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.

 
Go Back  dBforums > General > Database Concepts & Design > ERD help.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-10, 22:37
smudge1 smudge1 is offline
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..
Reply With Quote
  #2 (permalink)  
Old 03-04-10, 22:45
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,516
Quote:
Originally Posted by smudge1 View Post
I have a few questions on ERD design.
we're supposed to guess them?



sometimes i crack myself up
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-04-10, 22:53
smudge1 smudge1 is offline
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.
Reply With Quote
  #4 (permalink)  
Old 03-04-10, 23:12
r937 r937 is offline
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?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 03-04-10, 23:25
smudge1 smudge1 is offline
Registered User
 
Join Date: Mar 2010
Posts: 5
One to many? Are my entities correct...Researcher, Institution, Interests?
Reply With Quote
  #6 (permalink)  
Old 03-04-10, 23:44
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,516
Quote:
Originally Posted by smudge1 View Post
One to many?
why do you think this?


Quote:
Originally Posted by smudge1 View Post
Are my entities correct...Researcher, Institution, Interests?
what's an institution?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #7 (permalink)  
Old 03-04-10, 23:55
smudge1 smudge1 is offline
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?
Reply With Quote
  #8 (permalink)  
Old 03-05-10, 08:31
MarkATrombley MarkATrombley is offline
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.
Reply With Quote
  #9 (permalink)  
Old 03-05-10, 08:38
r937 r937 is offline
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...
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #10 (permalink)  
Old 03-05-10, 09:11
MarkATrombley MarkATrombley is offline
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.
Reply With Quote
  #11 (permalink)  
Old 03-05-10, 10:04
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Quote:
Originally Posted by MarkATrombley View Post
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)
__________________
Mike
Reply With Quote
  #12 (permalink)  
Old 03-05-10, 10:15
smudge1 smudge1 is offline
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On