Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write SQLs to create three tables based on given relational schemas and directions below. Based in Oracle DBMS, follow standard syntax. In addition of the

Write SQLs to create three tables based on given relational schemas and directions below. Based in Oracle DBMS, follow standard syntax.

image text in transcribed

In addition of the relational schema above, include the following specifications in the table creation. i. The OrderDate column of ORDERS table has a default value as a current system date, SYSDATE. ii. The value of OrderQuantity of ORDERINE table should be greater than 0. iii. The value of ProductType of PRODUCT table should be a value in this list {Books,Electronics, Home, Clothing} iv. When an order record in ORDERS table is deleted, all ORDERINE records associated with the OrderID of the deleted record are also deleted. v. When a CUSTOMER record is deleted, its associated ORDERS records CustomerID is changed to NULL.

ORDERS ORDERLINE PK OrderlD number(11) PK | | FK OrderID number(11) | FK | [F] ProductiD number(11) CustomerID number(11) OrderDate date OrderQuantity number(11) CUSTEROMER CustomerlD number(11) CustomerName varchar2125) CustomerAddr varchar2(30) PRODUCT ProductID number(11) ProductType varchar2130 PK

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions

Question

b. Will there be one assigned leader?

Answered: 1 week ago

Question

Do you currently have a team agreement?

Answered: 1 week ago