|
-
July 20th, 2011, 08:14 AM
#1
How to create ER diagram for this?
Consider the following entities
1) Entity name: Movie
Fields:
Title
MovieID (primary key)
ReleaseDate
ProductionCost
ProdCompName (foregin key for entity Production Company)
2) Entity name: Production Company
Fields:
ProdCompName (primary key)
ContactTelNo
3) Entity name: Actor
ActorName (primary key)
YearBorn
One movie is produced by a single production company. One production company can produce one or more movies.
One actor can act in any number of movies. A movie can have any number of actors in it.
I have made the ER diagram for the above. Since the relation between Actor and Movie is many-to-many, I also made an entity called Movie_Actor for the relation between them. Its fields are
MovieID
ActorName
Fee
Primary key is the composite key made of MovieID and ActorName
But I have problem in the following
Actors and Production companies can get Oscar awards. An actor can have none, 1 or more oscars. Similarly a production company can have none, 1, or more oscars.
How to show this in ER diagram?
What will be fields of Oscar entity?
What will be its primary key?
Should there be a single Oscar entity or should OscarForActor and OscarForProduction be two separate entities?
Thank you
Last edited by visharad; July 20th, 2011 at 10:52 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|