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: | Jul 2017 |
| Last Sign in: | 364 Weeks Ago, 6 Days Ago |
| Questions Answered: | 1850 |
| Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
Hey can u help me out with this assignment?Â
Â
 /*
You must query the University Northwind database as I have added some new rows and updated few rows in some tables for LEFT, RIGHT, FULL OUTER JOINs queries
The following queries refer to various types of JOINS we learned in class. Write the query against each question
and attach the .sql or word file to the assignment.
The column names that needs to be part of SELECT clause is shown within '()' parenthesis.
For question 10, convert the attached ER Diagram into Relational Schema using both Stable and Mapped Translation methods which you learnt in class
*/
Â
/*
1. List the Categories (CategoryID, CategoryName) which have Products (ProductID, ProductName, QuantityPerUnit, UnitPrice, UnitsInStock)
(Hint: Refer to Categories and Products table) (10 points)
*/
Â
/*
2. List the Regions (RegionID, RegionDescription) which have Territories (TerritoryID and TerritoryDescription)
(Hint: Refer to Regions and Territories table) (10 points)
*/
Â
/*
3. List the Products (ProductID, ProductName), which have Orders Details (OrderID, Quantity, UnitPrice) and Orders (ShipAddress, ShipCity, ShipCountry)
for ProductName = 'Tofu' (10 points)
*/
Â
/*
4. List Suppliers (SupplierID, CompanyName) who supply their Products (ProductID, ProductName) (10 points)
*/
Â
/*
5. List all the Products (ProductID, ProductName) and their Order Details (OrderID) if any (10 points)
*/
Â
/* 6. List only those Categories (CategoryID, CategoryName) which don't have any Products (ProductID) assigned (10 points) */ Â /* 7. List all Employees(EmployeeID, LastName, FirstName) and any Orders (OrderID) they have placed. Use RIGHT OUTER JOIN (10 points) */ Â /* 8. List all Orders and all Customers. (10 points) */
Â
/*Â
9. Execute the following queries (a and b) and explain why there is difference in the row counts. Look carefully the result set before you answer (10 points)
*/
/* a. */
SELECT
P.ProductID,
P.ProductName,
O.OrderID
FROMÂ
ProductsP
LEFT OUTER JOIN
[Order Details]ODONP.ProductID = OD.ProductID
LEFT OUTER JOIN
OrdersOONO.OrderID= OD.OrderID
ORDER BY
O.OrderID
Â
/* b. */
SELECT
P.ProductID,
P.ProductName,
O.OrderID
FROMÂ
ProductsP
LEFT OUTER JOIN
[Order Details]ODONP.ProductID = OD.ProductID
INNER JOIN
OrdersOONO.OrderID= OD.OrderID
ORDER BY
O.OrderID
Â
/*
10. Convert the attached ER Diagram into Relational Schema using both Stable and Mapped Translation methods which you learnt in class (10 points)
*/
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I