Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A) B) Given: CREATE TABLE customer_t( customerid NUMBER(11, 0) NOT NULL, customername VARCHAR2(25) NOT NULL, customeraddress VARCHAR2(30), customercity VARCHAR2(20), customerstate CHAR(2), customerpostalcode VARCHAR2(10), CONSTRAINT customer_pk

A)

image text in transcribed

B)

image text in transcribed

Given:

CREATE TABLE customer_t( customerid NUMBER(11, 0) NOT NULL, customername VARCHAR2(25) NOT NULL, customeraddress VARCHAR2(30), customercity VARCHAR2(20), customerstate CHAR(2), customerpostalcode VARCHAR2(10), CONSTRAINT customer_pk PRIMARY KEY (customerid) );

CREATE TABLE employee_t( employeeid VARCHAR2(10) NOT NULL, employeename VARCHAR2(25), employeeaddress VARCHAR2(30), employeebirthdate DATE, employeecity VARCHAR2(20), employeestate CHAR(2), employeezipcode VARCHAR2(10), employeedatehired DATE, employeesupervisor VARCHAR2(10), CONSTRAINT employee_pk PRIMARY KEY (employeeid) );

CREATE TABLE order_t( orderid NUMBER(11, 0) NOT NULL, customerid NUMBER(11, 0), orderdate DATE DEFAULT SYSDATE, CONSTRAINT order_pk PRIMARY KEY (orderid), CONSTRAINT order_fk1 FOREIGN KEY (customerid) REFERENCES customer_t( customerid) );

CREATE TABLE product_t( productid NUMBER(11, 0) NOT NULL, productlineid NUMBER(11, 0), productdescription VARCHAR2(50), productfinish VARCHAR2(20), productstandardprice DECIMAL(6, 2), CONSTRAINT product_pk PRIMARY KEY (productid) );

CREATE TABLE orderline_t( orderid NUMBER(11, 0) NOT NULL, productid NUMBER(11, 0) NOT NULL, orderedquantity NUMBER(11, 0), CONSTRAINT orderline_pk PRIMARY KEY (orderid, productid), CONSTRAINT orderline_fk1 FOREIGN KEY (orderid) REFERENCES order_t(orderid), CONSTRAINT orderline_fk2 FOREIGN KEY (productid) REFERENCES product_t( productid) );

Display the order total price of each order. ORDERID Order total price 1003 1009 1125 3700

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

More Books

Students also viewed these Databases questions

Question

2. What do you believe is at the root of the problem?

Answered: 1 week ago