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...
icon
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
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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…
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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY