The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Consider the following relations for a database that keeps track of auto sales in a car dealership (Option refers to some optional equipment installed on an auto):
CAR(Serial-No, Model, Manufacturer, Price)
OPTIONS(Serial-No, Option-Name, Price)
SALES(Salesperson-id, Serial-No, Date, Sale-price)
SALESPERSON(Salesperson-id, Name, Phone)
First, specify the foreign keys for the above schema, stating any assumptions you make. Next, populate the relations with a few example tuples, and then show an example of an insertion in the SALES and SALESPERSON relations that violates the referential integrity constraints and another insertion that does not. Then specify the following queries in relational algebra:
a. For the salesperson named ‘Jane Doe’, list the following information for all the cars she sold: Serial#, Manufacturer, Sale-price.
b. List the Serial# and Model of cars that have no options.
c. Consider the natural join operation between SALESPERSON and SALES. What is the meaning of a left outer join for these tables (do not change the order of relations). Explain with an example.
d. Write a query in relational algebra involving selection and one set operation and say in words what the query does.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll