With reference to the following graphical representation of the relational model and their corresponding tables, answer questions Q5-07: Relational Model PRODUCT-PART:

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter11: Database Performance Tuning And Query Optimization
Section: Chapter Questions
Problem 13RQ
icon
Related questions
Question
With reference to the following graphical representation of the relational model and their
corresponding tables, answer questions Q5-07:
Relational Model PRODUCT-PART:
P PID
PRODUCT
SerialNumber
Brand
P_PK (PID)
NUMBER (0)
VARCHAR2 (30)
VARCHAR2 (20)
- PID
Q5. [CLO4:
Write the SQL statement to create the table PART [
per above diagram, during the table creation.
Q6. [CLO4:
PName
Cost
SerialNumber
F PRODUCT_PID
PART
NUMBER (0)
VARCHAR2 (100)
NUMBER (52)
VARCHAR2 C20)
NUMBER (0)
PART_PK (PID)
PART_PRODUCT_FK (PRODUCT_PID)
-] including all the constraints
] as
Assume that the PART table is created. Write an SQL statement to ensure that the values of cost will
be more than 0.
Q7. [CLO4
a) Assume that the PRODUCT table is created and that the table has no data. Write the SQL
statement(s) that will add a new column called "website" with datatype varchar(30).
b) Assume that the PRODUCT table is created and that the table has no data. Write the SQL
statement(s) that will delete column "Brand".
Transcribed Image Text:With reference to the following graphical representation of the relational model and their corresponding tables, answer questions Q5-07: Relational Model PRODUCT-PART: P PID PRODUCT SerialNumber Brand P_PK (PID) NUMBER (0) VARCHAR2 (30) VARCHAR2 (20) - PID Q5. [CLO4: Write the SQL statement to create the table PART [ per above diagram, during the table creation. Q6. [CLO4: PName Cost SerialNumber F PRODUCT_PID PART NUMBER (0) VARCHAR2 (100) NUMBER (52) VARCHAR2 C20) NUMBER (0) PART_PK (PID) PART_PRODUCT_FK (PRODUCT_PID) -] including all the constraints ] as Assume that the PART table is created. Write an SQL statement to ensure that the values of cost will be more than 0. Q7. [CLO4 a) Assume that the PRODUCT table is created and that the table has no data. Write the SQL statement(s) that will add a new column called "website" with datatype varchar(30). b) Assume that the PRODUCT table is created and that the table has no data. Write the SQL statement(s) that will delete column "Brand".
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Database Development
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning