Question
Answer all questions by referring to the following tables: CUSTOMER Primary Key: C_NO C_NO C_NAME CITY 1 C1 NEW YORK 2 C2 NEW YORK 3
Answer all questions by referring to the following tables:
CUSTOMER
Primary Key: C_NO
C_NO | C_NAME | CITY |
1 | C1 | NEW YORK |
2 | C2 | NEW YORK |
3 | C3 | MIAMI |
4 | C4 | MIAMI |
5 | C5 | BOSTON |
6 | C6 | CHICAGO |
7 | C7 | HOUSTON |
8 | C8 | PITTBURGH |
PRODUCT
Primary Key: P_NO
P_NO | P_NAME | PRICE | STOCK |
1 | P1 | $1.00 | 1000 |
2 | P2 | $2.00 | 4000 |
3 | P3 | $4.00 | 2000 |
4 | P4 | $8.00 | 500 |
5 | P5 | $3.00 | 200 |
6 | P6 | $5.00 | 1500 |
7 | P7 | $2.00 | 3000 |
S_ORDER
Primary Key: C_NO+P_NO
Foreing Key: C_NO References CUSTUMER table. RESTRICT on DELETE.
Foreing Key: P_NO References PRODUCT table. RESTRICT on DELETE.
C_NO | P_NO | QUANTITY |
1 | 1 | 10 |
1 | 2 | 5 |
1 | 3 | 8 |
2 | 1 | 4 |
2 | 2 | 10 |
2 | 4 | 5 |
2 | 5 | 20 |
3 | 1 | 10 |
3 | 4 | 10 |
4 | 1 | 20 |
4 | 6 | 20 |
5 | 1 | 30 |
6 | 1 | 30 |
7 | 1 | 40 |
8 | 1 | 50 |
1. Can the following record be added to the S_ORDER table? Explain
C_NO | P_NO | QUANTITY |
2 | 6 | 20 |
2. Can the following record be removed from the CUSTOMER table? Explain
C_NO | C_NAME | CITY |
8 | C8 | PITTSBURG |
3. Can the following record be removed from the PRODUCT table? Explain
P_NO | P_NAME | PRICE | STOCK |
5 | P5 | $3.00 | 200 |
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