Create an sql script that contains how many


Assignment

Directions: Write the answer to an exam question on this document immediately following the question. Do not provideSQL commands on this document. Submit SQL script files separately. Write the result of a queryafter the labelThe result is.

The instructor or TA will execute all the scripts submitted by each student to verify correctness and completeness ... all scripts must execute correctly without error for consideration for credit.

Question 1:

A data model of a shopping application allows a customer to have only one billing address and at least one ship-to-addresses.

a. Describe how you would implement the customer billing and shipping addresses as an Oracle relational database. Be sure to describe how the database uniquely identifies the billing addresses for each customer.

b. Describe how you would implement the customer billing and shipping addresses as an Oracle object-relational database. Be sure to identify the data type or structure that allows more for than one value for the billing address.

c. Describe how you would implement the customer billing and shipping addresses as an Oracle relational database that allows for hierarchical queries. Be sure to identify the data type or structure that allows more for than one value for the billing address.

d. Create an SQL script that contains

i. The DDL to create each database

ii. The DML to add data to each database

iii. SQL commands to query each database:

1. How many ship-to-addresses does each customer have?

2. How many customers have just one ship-to-address?

3. How many customers have a ship-to-address that is the same as the billing address?

iv. Documentation that describes the purpose and motivation behind the SQL command

· Submit a copy of the Oracle script as a separate file with the name Q1_Final.SQL to the assignment folder for the final exam.

Request for Solution File

Ask an Expert for Answer!!
Database Management System: Create an sql script that contains how many
Reference No:- TGS02535843

Expected delivery within 24 Hours