0% found this document useful (0 votes)
30 views

Assignment 1 ERD Instruction 2023-1

The document contains an entity relationship diagram (ERD) for a movie rental database and 13 questions asking to interpret the relationships between entities in the ERD. The respondent answers each question by identifying the relationship as one-to-many, many-to-many, or no relationship and provides an explanation of the key and foreign key fields that define the relationship.

Uploaded by

Sree Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Assignment 1 ERD Instruction 2023-1

The document contains an entity relationship diagram (ERD) for a movie rental database and 13 questions asking to interpret the relationships between entities in the ERD. The respondent answers each question by identifying the relationship as one-to-many, many-to-many, or no relationship and provides an explanation of the key and foreign key fields that define the relationship.

Uploaded by

Sree Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Assignment 1: ERD Interpretation Due Date: 11:59pm 09/14/2023

Instruction: Below is an ERD for movie rental. Interpret the ERD and type your answer below each of the
questions.
1. Interpret the relationship between film, film_category, category.
 This Relation comes under many-to-many relation.

Explanation: -

 Here the film_id in the film_ category table was taking the reference from the film_id
present in the film table, So the film_id of the film table is the primary key and film_id of
the film_category table is the foreign key.
 And category_id in the film_category table was taking the reference from the category_id
present in the category table, So the category_id of the category table is the primary key
and category_id of the film_category table is the foreign key.
 So from the above explanation film_category is the junction table that contains film_id,
category_id foreign key columns to form many-to-many relation between the film table
and category table.
 Individually the film and film_category tables have a one-to-many realation and the
category and film_category tables have one-to-many relation.
 But they form many-to-many relation by using a junction table film_category.

2. Interpret the relationship between film and language.


 This Relation comes under one-to-many relation.

Explanation: -

 Here the language table stores the language records where language_id is the primary
key.
 The film table stores the film records where film_id is the primary key and language_id
is the foreign key.
 Each language has one record in language table.
 Each language can have many films in film table.
 The language and film tables are linked by the key column language_id.
 language_id is the foreign key in film table linking to the primary key language_id in the
language table.
 Thus, one record of the language table can point to multiple records in the film table.
 This will represent that this relation comes under one-to-many relation.

3. Interpret the relationship between film and actor.


 This is no relation between film and actor tables.
 If suppose we involve the film_actor table in between the film table and actor table then it
will be many-to-many relation.
 So here we are checking only for film table and actor table, So that there is no such primary
key and foreign key relation between these two table.
4. Interpret the relationship between film and inventory.
 This relation comes under one-to-many relation.

Explanation: -

 In film table film_id is the primary key and in inventory table film_id is the foreign
key.
 Each film has one record in film table.
 Each film can have many inventory’s in inventory table.
 The film and the inventory are linked with the key column film_id.
 film_id is the foreign key in inventory table linking to the primary key film_id in the
film table.
 Thus, one record of the film table can point to multiple records in the inventory
table.
 This will represent that this relation comes under one-to-many relation.

5. Interpret the relationship between inventory and store.


 This relation comes under one-to-many relation.

Explanation: -

 In store table primary key is the store_id and in inventory table store_id is the
foreign key.
 Each store has one record in store table.
 Each store can have many inventory’s in inventory table.
 The store and inventory are linked with the key column store_id.
 Store_id is the foreign key in inventory table linking to the primary key store_id in
the store table.
 Thus, one record of the store table can point to multiple records in inventory table.
 This will represent that this relation comes under one-to-many relation.

6. Interpret the relationship between inventory and rental.


 This relation comes under one-to-many relation.

Explanation: -

 In inventory table inventory_id is the primary key and in rental table inventory_id is
the foreign key.
 Each inventory has one record in inventory table.
 Each inventory can have many rental’s in rental table.
 The inventory and rental are linked with the key column inventory_id.
 Inventory_id is the foreign key in rental table linking to the primary key inventory_id
in the inventory table.
 Thus, one record of the inventory table can point to multiple records in rental table.
 This will represent that this relation comes under one-to-many relation.

7. Interpret the relationship between store and staff.


 This relation comes under One-to-many relation.

Explanation: -

 In store table store_id is the primary key and in staff table store_id is the foreign
key.
 Each store has one record in store table.
 Each store can have many staff in staff table.
 The store and staff are linked with the key column store _id.
 store_id is the foreign key in staff table linking to the primary key store_id in the
store table.
 Thus, one record of the store table can point to multiple records in staff table.
 This will represent that this relation comes under one-to-many relation.

8. Interpret the relationship between staff and rental.


 This relation comes under One-to-many relation.

Explanation: -

 In staff table staff _id is the primary key and in rental table staff _id is the foreign key.
 Each staff has one record in staff table.
 Each staff can have many rentals in rental table.
 The staff and rental are linked with the key column staff _id.
 staff _id is the foreign key in rental table linking to the primary key staff _id in the staff
table.
 Thus, one record of the staff table can point to multiple records in rental table.
 This will represent that this relation comes under one-to-many relation.
9. Interpret the relationship between customer and rental.
 This relation comes under One-to-many relation.

Explanation: -

 In customer table customer_id is the primary key and in rental table customer_id is the
foreign key.
 Each customer has one record in customer table.
 Each customer can have many rentals in rental table.
 The customer and rental are linked with the key column customer_id.
 customer_id is the foreign key in rental table linking to the primary key customer_id in
the customer table.
 Thus, one record of the customer table can point to multiple records in rental table.
 This will represent that this relation comes under one-to-many relation.

10. Interpret the relationship between customer and payment.


 This relation comes under One-to-many relation.

Explanation: -

 In customer table customer_id is the primary key and in payment table customer_id
is the foreign key.
 Each customer has one record in customer table.
 Each customer can have many payments in payment table.
 The customer and payment are linked with the key column customer_id.
 customer_id is the foreign key in payment table linking to the primary key
customer_id in the customer table.
 Thus, one record of the customer table can point to multiple records in payment
table.
 This will represent that this relation comes under one-to-many relation.

11. Interpret the relationship between staff and payment.


 This relation comes under One-to-many relation.

Explanation: -

 In staff table staff_id is the primary key and in payment table staff_id is the foreign
key.
 Each staff has one record in staff table.
 Each staff can have many payments in payment table.
 The staff and payment are linked with the key column staff_id.
 staff_id is the foreign key in payment table linking to the primary key staff_id in the
staff table.
 Thus, one record of the staff table can point to multiple records in payment table.
 This will represent that this relation comes under one-to-many relation.

12. Interpret the relationship between staff and address.


 This relation comes under One-to-many relation.

Explanation: -

 In address table address_id is the primary key and in staff table address_id is the
foreign key.
 Each address has one record in address table.
 Each address can have many staff in staff table.
 The address and staff are linked with the key column address_id.
 address_id is the foreign key in staff table linking to the primary key address_id in
the address table.
 Thus, one record of the address table can point to multiple records in staff table.
 This will represent that this relation comes under one-to-many relation.

13. Interpret the relationship between store and address.

 This relation comes under One-to-many relation.

Explanation: -

 In address table address_id is the primary key and in store table address_id is the
foreign key.
 Each address has one record in address table.
 Each address can have many stores in store table.
 The address and store are linked with the key column address_id.
 address_id is the foreign key in store table linking to the primary key address_id in
the address table.
 Thus, one record of the address table can point to multiple records in store table.
 This will represent that this relation comes under one-to-many relation.
14. Interpret the relationship between customer and address.
 This relation comes under One-to-many relation.

Explanation: -

 In address table address_id is the primary key and in customer table address _id is
the foreign key.
 Each address has one record in address table.
 Each address can have many customers in customer table.
 The address and customer are linked with the key column address_id.
 address_id is the foreign key in customer table linking to the primary key address_id
in the address table.
 Thus, one record of the address table can point to multiple records in customer
table.
 This will represent that this relation comes under one-to-many relation.

15. Interpret the relationship between city and address.


 This relation comes under One-to-many relation.

Explanation: -

 In city table city_id is the primary key and in address table city_id is the foreign key.
 Each city has one record in city table.
 Each city can have many addresses in address table.
 The city and address are linked with the key column city_id.
 city_id is the foreign key in address table linking to the primary key city_id in the city
table.
 Thus, one record of the city table can point to multiple records in address table.
 This will represent that this relation comes under one-to-many relation.

16. Interpret the relationship between city and country.


 This relation comes under One-to-many relation.
Explanation: -

 In country table country_id is the primary key and in city table country_id is the
foreign key.
 Each country has one record in country table.
 Each country can have many cities in city table.
 The country and city are linked with the key column country_id.
 country_id is the foreign key in city table linking to the primary key country_id in the
country table.
 Thus, one record of the country table can point to multiple records in city table.
 This will represent that this relation comes under one-to-many relation.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy