Professional Documents
Culture Documents
1
A Movie Domain
• Some movies have many stars and some have
none.
• A studio has a name and an address, and is
uniquely identified by its name.
• A star can belong to at most one studio.
• A studio can own any number of movies.
• A movie is always owned by at most one studio,
but some are not owned by any studio.
A Movie Domain
• A studio may or may not have a president, but
nobody can be a studio president without being
the president of some studio.
• Studio presidents are uniquely identified by their
name, but they also have an address.
• No one can be the president of more than one
studio.
• Stars and studio presidents are both examples
of movie people, but there are other types of
movie people as well.
• No star can be a studio president.
2
A Movie Domain
From the domain description we derive the entity
types and their attributes (including primary
keys):
• Entity types and their attributes:
– Movie
• title, year, length
– Star
• name, address
– Studio
• name, address
– Studio President
• name, address
– Movie People
• name, address
A Movie Domain
From the domain description we derive the
relationships between the entity types and
their cardinalities:
• Relationships:
– some movies are remakes of (exactly 1)
movie; each movie has (0 or more) remakes
– studios own (0 or more) movies; each movie
is owned by (at most 1) studio
– stars appear in (0 or more) movies; movies
have (0 or more) stars appearing in them
3
A Movie Domain
4
remake-of
m o vie s tu d io
ow ns
title name
y ear addres s
length
name
addres s
s tar s tu d io -p r e s
belongs -to
5
Movie Domain 2
• New entity types and their attributes:
– Contract
• salary, star, movie title, movie year, star’s
studio, producing studio
• Contract is an associative entity type used
to represent a multi-way relationship. It is
therefore a weak-entity type. All of the
components of its primary key come from
identifying relationships.
Movie Domain 2
• New relationships (these are all identifying
relationships):
– a contract has (exactly 1) star; a star can have
(0 or more) contracts
– a contract has (exactly 1) movie; a movie can
have (0 or more) contracts
– a contract has (exactly 1) star’s studio; a
star’s studio can have (0 or more) contracts
– a contract has (exactly 1) producing studio; a
producing studio can have (0 or more)
contracts
6
ER-Diagram for Movie Domain 2
• The ER-Diagram for Movie Domain 2 is
shown on the next slide.
remake-of
s tudio
m ovie
ow ns
name
title
address
year studio-of -star
length
movie-of -contract
producing-studio
contr act
salary
appears-in president-of
s tar s tudio-pre s
belongs-to