Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the subject is Data base and we are using oracle Answer ALL Questions The relational schema below shows the partial database of J&M Sales Corporation.

image text in transcribed
image text in transcribed
the subject is Data base and we are using oracle
Answer ALL Questions The relational schema below shows the partial database of J&M Sales Corporation. The primary keys are in bold and foreign keys are underlined. Customer Customer CustomerName 1 CustomerAddress Customer Phone Payment Paymentio on Customer ItemID Payment Date QtyPurchased Payment Amount Itemid 3 Item Name Item Type Item Price Item al Distributor DistributorID on Itemid Status Distribution Date Distribution Cost (1) Assume that Item table has already been created; write a query to create the Distributor table. You may assume any suitable data type for the attributes in the table. When creating the Distributor table, include a constraint to ensure that the date of distribution value is from year 2006 to 2008. [4.5 marks] (4) Assume that Item and Distributor tables have the following records: ItemID 100 101 Item Name Pen Ruler Item Type ItemPrice Stationery 31.90 Stationery 2.15 ItemBal 10 1 Dlatributos DistributorID 1 2 1 3 ItemID 100 101 101 100 100 Status Completed Completed Completed Delayed Completed Distribution Date 30-Jan-07 22-Feb-ox 28-Am-08 30-Mar-6 15-May-08 DistributionCost 23.10 37 50 9.50 150 11 60 Referring to the Item and Distributor tables shown above.write a nested-query to list the names of item distribution cost and IDs of the distributor for each item that has the lowest distribution cost and the items are distributed in either 2007 or 2008. A sample of the result set after query execution is shown below. [4 marks] DistributorID Item Name Ruler Pen DistributionCost 9.50 11.60

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