Академический Документы
Профессиональный Документы
Культура Документы
Assignment #3
– Very Crude Version of Solution
Year
Director Genre
Keyword
Title
Data Modeling - IMDB #2 Langauge
Release
Date Actor
Movies
MPAA Running
Rating Time
Metascore Storyline
Review_CNT Location
Star Rating Country
4
Assignment #3 Assignment #3
– Very Crude Version of Solution – Very Crude Version of Solution
If you implemented this far, you will get the half point
for Assignment #3.
5 6
Let’s Take One Step Further! Let’s Take One Step Further!
• A movie belongs to more than one genre. • An average score by 216,944 reviews
– How many movies are belonged to Action, – How many movies are above 5.0 by
Fantasy, or Sci-Fi? metascore?
– How many movies are belonged to Adventure – Which movie has the highest (lowest)
and Western? metascore?
– Which movies have the most diverse genres – Which movie has the highest (lowest) number
(# of genres)? of reviews?
7 8
Business Rules
Let’s Take One Step Further!
A movie is uniquely identified by its title,
and release date.
• There are more than one actor per movie. There exists more than one actor per
movie.
– How many actors played in Black Panther? A few star actors are displayed per
– How many actors on average played in movie
Director
movies that were released in 2018?
Case 1) – A movie is directed by only
one director.
Case 2) – A movie can be directed by
more than one director.
A movie is searchable by more than one
keyword.
A movie is categorized into more than
one genre.
A movie has only one MPAA: G, PG, PG-
9 13, R, or NC-7 10
Movies Actors
PK Title PK Actor_ID
PK Release_Date
Name
Language
IsStar
Running_Time
Storyline
Country
AKA
MPAA
11 12
Business Rules – Cont’d Business Rules – Cont’d
Conceptual Model DDL
Advertise
PK FK Title
PK FK Release_Date Sites
PK FK Site PK Site
PK FK Country PK Country
Movies
PK Title
PK Release_Date
Language
Running_Time
Storyline
Country
AKA
A movie is advertised by more than one official site.
MPAA
638+1+36=675
Review
PK FK Title
PK FK Release_Date
PK FK User_ID
Content
Mixed = 0.5
Score
Negative < 0.5
Key Rules Sentiment
A user can rate or review more than one movie. The sentiment of a ReadCNT
17 18
PK FK Release_Date
PK FK User_ID
Score
Rating_Date
PK Title
PK Release_Date Act
Actors
Language PK FK Title
PK Actor_ID
Running_Time PK FK Release_Date
Name
Storyline PK FK Actor_ID
IsStar
Country Role
AKA Movies
MPAA PK Title
PK Release_Date Act
Key Rules Actors
Language PK FK Title
PK Actor_ID
Role Running_Time PK FK Release_Date
Name
An actor acts a role per movie. Storyline PK FK Actor_ID
IsStar
An actor can act more than one role per movie. Country PK Role
AKA
21 MPAA
22
23 24
Assignment #4 Assignment #4
1. Based upon the figures, produce necessary business rules and a • Deliverables
corresponding relationship matrix.
a. Specify entities – Screen capture of database diagram
b. Determine relationships generated by using SQL Server or MySQL
2. Draw your conceptual model Workbench.
3. Examine whether your table(s) violates normal forms.
a. If no table violates, you are good to go
– Or, SQL DDL script which will implement your
b. If one or more tables violate, resolve problems physical model (including tables, columns,
4. Determine data types and necessary data integrities of columns. data types, relationships and so on).
a. Entity integrity
b. Domain integrity
c. Referential integrity • Due date: April 23 before the Class meeting
5. Convert your conceptual model into a physical model.
25 26