Question: Needs to be done with SQL Instructions Try to answer all the questions using what you have learned in class . When writing a query,
Instructions Try to answer all the questions using what you have learned in class . When writing a query, write the query in a way that it would work over all possible database instances and not just for the given example instance! . After creating the relations, you can make up some data and insert them into the relations . Please submit the bomework (as a single sql file your name.sql) electronically using blackboard . In the your name.sql file, make sure you have marked the answer for each question using comments . All the seql scripts should be executable in Oracle 11g (eg on fourier) or recent versionas Consider the following database schema and example instance Employee Customer enamedob salary 001 ris 1/03/1986 100,000 0012 Edward 07/24/1973 120,000 0013 Anna 08/12/1992 80,000 0014 Kim 08/26/1986 95,000 001 Carol 04/15/1988 97,000 A101 Chase A102 Citi New York NY A103 TD Bank Bosto ALA A104 Moto Chicago IL A10Dey FL Product Ci78il Desk C17812Chair C23453 PC C34451Mac 500 200 1-300 Sales eid cid 0011A102 C17812 0013 A10 C34451 Manages eid1 0011 0013 0013 0017 0012 0013 200 0012 A102 C23453100 50 Hints: Underlined attribute(s) form the primary key of a relation Relation Sales stores the sales information: the salesman (employee ID) who is in charge of the ordered product, the product ID, the customer ID, and the quantities of ordered products .The attributes eid, eid and pid of relation Sales are the foreiga keys to relations Employee (sakesman), Customer and Product, respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
