Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tables: Create table Item( &nbs... Bookmark Tables: Create table Item( ItemId char(5) constraint itmid_unique primary key, Decription varchar2(30), Unitcost number(7,2)); Create table Customer( custID char(5)

Tables:

Create table Item( &nbs...

Bookmark

Tables:

Create table Item(

ItemId char(5) constraint itmid_unique primary key,

Decription varchar2(30),

Unitcost number(7,2));

Create table Customer(

custID char(5) constraint cid.unique primary key,

custName varchar2(20),

address varchar2(50));

Create table Orderdata(

orderID char(5) constraint oid_uniq primary key,

orderdate date,

shipdate date,

ItemId char(5) references Item.ItemId,

No_of_items number(4),

Unitcost number(7,2),

Order_total number(7,2),

custID char(5) references customer.custID);

Insert Into Item values(A123,Pencil,2.5);

Insert Into Item values(B123,Pen,15);

Insert Into Customer(C123,ABC Gen stores,Sanfransico);

Insert Into Customer(C132,XYZ stores,California);

Insert into Orderdata(o123,12-aug-2016,12-aug-2016,A123,5,2.5,12.5,c123);

Insert into Orderdata(o124,14-aug-2016,14-aug-2016,B123,5,15,75,c132);

_____________________________________________________________

Enhance your Module 5 CT database table structures, via your selected RDBMS, as you wish.

Then, using SQL and an SQL script file, add at least five more rows of data to each of your tables.

Then, using SQL and an SQL script file, create and execute advanced queries of your choice that demonstrate each of the following:

The use of a GROUP BY clause, with a HAVING clause, and one or more group functions

The use of UNION operator

The use of a subquery

The use of an outer join

Then create and execute at least one SQL UPDATE and at least one SQL DELETE query.

Finally, create and use an SQL view and in a SELECT query.

Submit the following outputs of your SQL script file processing, in this order and appropriately labeled, in a single Word file:

The SQL and results of your INSERT statements to further populate your tables

The SQL and results of your 4 advanced SELECT queries

The SQL and results of your UPDATE and DELETE queries

The SQL and results of your view creation and its use in a SELECT query

You must show all of your SQL as it executed in Management Studio or other development environments. This includes the results returned by your selected RDBMS.

(((((((((((Note)))))))))))))))): you must populate any other tables and show the execution of your SQL statements as required.

Use a SELECT statement using the UNION operator.

add at least 5 more rows to each of your tables

create a view and use it in a SELECT query...

Do not answer if you dont know.

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_2

Step: 3

blur-text-image_3

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

1. Identify the sources for this conflict.

Answered: 1 week ago

Question

3. The group answers the questions.

Answered: 1 week ago