Write the SQL code to create the table structures for the entities shown in Figure 1. The structures should contain the attributes specified in the ERD. Use data types that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD.
Write the SQL code to create the table structures for the entities shown in Figure 1. The structures should contain the attributes specified in the ERD. Use data types that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Please help with the following
Write the SQL code to create the table structures for the entities shown in Figure 1. The structures should contain the attributes specified in the ERD. Use data types that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD.
![Figure 1:
DETAILRENTAL
MEMBERSHIP
PK,FK1 RENT NUM
PK,FK2 VID NUM
RENTAL
PK MEM_NUM
PK RENT_NUM
H--O
MEM_FNAME
MEM_LNAME
MEM_STREET
МЕМ СITY
MEM_STATE
МЕM ZIP
MEM_BALANCE
DETAIL_FEE
DETAIL DUEDATE
DETAIL_RETURNDATE
DETAIL_DAILYLATEFEE
RENT_DATE
FK1 MEM_NUM
MOVIE
VIDEO
PK
H-O
VID_NUM
PK
MOVIE_NUM
PRICE
VID_INDATE
FK1 MOVIE_NUM
MOVIE_TITLE
MOVIE YEAR
MOVIE COST
MOVIE_GENRE
FK1 PRICE_CODE
PK PRICE CODE
H0---O
PRICE DESCRIPTION
PRICE RENTFEE
PRICE DAILYLATEFEE
Figure 2:
MEMBERSHIP
МЕМ
МЕМ
МЕМ
МЕМ
MEM
MEM_STREET
MEM_CITY
MEM_ZIP
NUM
FNAME
LNAME
STATE
BALANCE
102
Tami
Dawson
2632 Takli Circle
Norene
TN
37136
11
Curt
Knight
4025 Cornell Court
Flatgap
Quebeck
103
KY
41219
6
104
Jamal
Melendez
788 East 145th Avenue
TN
38579
105
Iva
Mcclain
6045 Musket Ball Circle
Summit
KY
42783
15
106
Miranda
Parks
4469 Maxwell Place
Germantown
TN
38183
107
Rosario
Elliott
7578 Danner Avenue
Columbia
TN
38402
108
Mattie
Guy
4390 Evergreen Street
Lily
KY
40740
RENTAL
RENT NUM
RENT DATE
MEM_NUM
1001
01-MAR-09
103
1002
01-MAR-09
105
1003
02-MAR-09
102
1004
02-MAR-09
110
1005
02-MAR-09
111](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb44b9793-0ad6-40fb-a2b1-d5aa6c545792%2Fba4308a6-8820-4d1f-8b30-16a1cf7eed25%2Fopqjbg8_processed.png&w=3840&q=75)
Transcribed Image Text:Figure 1:
DETAILRENTAL
MEMBERSHIP
PK,FK1 RENT NUM
PK,FK2 VID NUM
RENTAL
PK MEM_NUM
PK RENT_NUM
H--O
MEM_FNAME
MEM_LNAME
MEM_STREET
МЕМ СITY
MEM_STATE
МЕM ZIP
MEM_BALANCE
DETAIL_FEE
DETAIL DUEDATE
DETAIL_RETURNDATE
DETAIL_DAILYLATEFEE
RENT_DATE
FK1 MEM_NUM
MOVIE
VIDEO
PK
H-O
VID_NUM
PK
MOVIE_NUM
PRICE
VID_INDATE
FK1 MOVIE_NUM
MOVIE_TITLE
MOVIE YEAR
MOVIE COST
MOVIE_GENRE
FK1 PRICE_CODE
PK PRICE CODE
H0---O
PRICE DESCRIPTION
PRICE RENTFEE
PRICE DAILYLATEFEE
Figure 2:
MEMBERSHIP
МЕМ
МЕМ
МЕМ
МЕМ
MEM
MEM_STREET
MEM_CITY
MEM_ZIP
NUM
FNAME
LNAME
STATE
BALANCE
102
Tami
Dawson
2632 Takli Circle
Norene
TN
37136
11
Curt
Knight
4025 Cornell Court
Flatgap
Quebeck
103
KY
41219
6
104
Jamal
Melendez
788 East 145th Avenue
TN
38579
105
Iva
Mcclain
6045 Musket Ball Circle
Summit
KY
42783
15
106
Miranda
Parks
4469 Maxwell Place
Germantown
TN
38183
107
Rosario
Elliott
7578 Danner Avenue
Columbia
TN
38402
108
Mattie
Guy
4390 Evergreen Street
Lily
KY
40740
RENTAL
RENT NUM
RENT DATE
MEM_NUM
1001
01-MAR-09
103
1002
01-MAR-09
105
1003
02-MAR-09
102
1004
02-MAR-09
110
1005
02-MAR-09
111
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY