Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Language: SQL / Database Management Question: Choose a primary key for the items table, fully explaining and justifying your answer, including why any other potential
Language: SQL / Database Management
Question: Choose a primary key for the items table, fully explaining and justifying your answer, including why any other potential candidate keys are not suitable.
The following four data tables describe the available items, orders, users, and deliveries for a certain restaurants online delivery service:
items
code | description | price |
---|---|---|
HAMBGR | Hamburger | 4.29 |
CHZBGR | Cheeseburger | 4.99 |
FRYSML | Small fries | 1.99 |
FRYLRG | Large fries | 2.99 |
FNCOLA | Coke | 1.49 |
orders
order_id | item | quantity |
---|---|---|
0001 | CHZBGR | 2 |
0001 | FRYLRG | 1 |
0002 | HAMBGR | 1 |
0002 | FNCOLA | 1 |
0003 | CHZBGR | 3 |
users
login | name | address |
---|---|---|
john123@geemail.com | John | 123 Number St |
alice89@h0tmail.edu | Alice | 88 Infinity Rd |
jdepp@pirates.com | Johnny | 21 Jump St |
kat22@yah000.net | Kathryn | 65 Leonin Ln |
deliveries
order_id | user | delivered |
---|---|---|
0001 | alice89@h0tmail.edu | Yes |
0002 | john123@geemail.com | Yes |
0003 | alice89@h0tmail.edu | No |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started