Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SUPPLIER S#: SNAME CITY STATUS S1 IBM NY S2 KLM AMS S3 ATT NY S4 GTE LA S5 MCI NY PART: P# PNAME COLOR WEIGHT
SUPPLIER S#: | ||
SNAME | CITY | STATUS |
S1 | IBM | NY |
S2 | KLM | AMS |
S3 | ATT | NY |
S4 | GTE | LA |
S5 | MCI | NY |
PART:
P# | PNAME | COLOR | WEIGHT |
P1 | PC/XT | BLACK | 10 |
P2 | PS/2 | RED | 20 |
P3 | BOLT | BLACK | 5 |
P4 | PIN | BLUE | 1 |
SP: | S# | P# | QTY |
S1 | P1 | 30 | |
S1 | P2 | 40 | |
S1 | P3 | 10 | |
S1 | P4 | 10 | |
S2 | P1 | 30 | |
S2 | P2 | 40 | |
S3 | P1 | 40 | |
S3 | P3 | 50 | |
S4 | P4 | 40 |
Define primary key and foreign keys and enforce referential integrity.
Also, enforce the following integrity constraints:
- Suppliers may only be in NY, SF, AMS or LA.
- The quantity supplies may not be negative.
- A supplier may not supply more than 5 products.
- A part may not weigh more than 100.
- NY supplies may not supply green parts.
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