Draw an er diagram to represent the database

Assignment Help Other Subject
Reference no: EM132195761

Objectives:

• Learn to implement advance SQL statements
• To practise joining tables for retrieving data
• To practise the use of relational set operators to merge data

Activities

Task

1) Create a new database called Food_Beverages and import the fileFood_Beverages.sql.

2) Draw an ER diagram to represent thedatabase.

3) Use this new database to implement the SQL statements to complete the following:

a) In a following SELECT statement, how many rows will there be in the output? Explain how you have derived at this number. Describe how you can confirm the number iscorrect.

SELECT P.ProductID, C.CategoryID FROM Product AS P, Category AS C;

b) Are all the rows in the output of (a) meaningful? How can you modify that SELECT statement so that the rows in the two tables are logically joined and every row in the output ismeaningful?

c) Display the ID and the shipped date of every order along with the ID and name of the company in charge of shippingit.

d) Show the name and the quantity of the product(s) being listed in eachorder.

e) List the full name and the title of the person which each employee reports to. The ID and last name of the employee should be included in theoutput.

f) Display the ID and contact person of the supplier of the discontinued products. The ID of the product and category ID it belongs to should be included in theoutput.

g) Show the average unit price of the products in each category. The name of each category should be included in theoutput.

h) List the name and title of every customer contact person from Berlin, followed by the full name and title of the employees based in London. The city should be included in the output. (hint: use a relational setoperator)

i) Show the orders which have more than 5 products listed in them? The Order ID and the number of products list in it should be in theoutput.

j) What is the largest discount given to a product beingordered?

Reference no: EM132195761

Questions Cloud

Strategy important to firm in twenty-first century landscape : What is the definition of competitive strategy, and why is this strategy important to firms in the twenty-first century landscape?
Create a memo using memo template : Revise the program to reflect the following changes: Use a for loop to prompt the student for the price of each book based upon the number of classes.
Describe the search processes you implemented : Describe the search processes you implemented (including search words, and databases you searched), for obtaining the papers for the SLP assignment.
What are the advantages of using narrative text : In an essay of 1,250-1,500 words, discuss and present the following: What are the advantages of using narrative text
Draw an er diagram to represent the database : Create a new database - Draw an ER diagram to represent the database - In a following SELECT statement, how many rows will there be in the output?
Interpretation of the coefficient of x 1be : Suppose a multiple regression model is given by y =1.61x 1+5.58 x2 +30.48 What would an interpretation of the coefficient of x 1be?
What is the purpose of the sopa and pipa : CPSC 311 As an industry insider, look at both acts and think about the benefits and the drawbacks. In a research paper, cover the following questions.
Adults rated the effectiveness of advertisements : In a? study, a random sample of 20 adults rated the effectiveness of advertisements. Each adult rated an advertisement that lasted 30 or 60 seconds.
How would you respond to this observation : The problem with risk analysis is that it is possible to imagine virtually anything going wrong on a project.

Reviews

Write a Review

Other Subject Questions & Answers

  How has public health informatics improved public health

How has public health informatics improved public health and public health services offered to Americans over the last two decades?

  Executive summary of the standards and expectations

Review your state's (South Carolina) law or administrative rule regarding informed consent and the requirements of human service workers. Write a 300- to 500-word executive summary of the standards and expectations

  Create a productive work environment

Budgets play a critical role in management activities such as planning, controlling and motivating employees. Used effectively, budgets can help a company achieve its goals and create a productive work environment

  What are the pros and cons of sparklines vs charts

What are the pros and cons of sparklines vs. charts? What needs to be done to a database to ensure that the data is useful and what role can queries play in that

  What are the various theories of motivation

Explain what is motivation? What factors must be considered in maximizing productivity? What are the various theories of motivation?

  Discuss the internet crime vs street crime

Internet crime has contributed to the decline in traditional "street crime" in part because the daily routines of people have shifted.

  Define tarheels play in the atlantic coast conference

Jeff is an avid UNC-Chapel Hill basketball fan, and drives to the Greensboro Coliseum to watch his beloved Tarheels play in the Atlantic Coast Conference (ACC)

  What ways which hippocrate changed ancient views of medicine

What were the major ways in which Hippocrates changed the ancient views of medicine and illness? How do his theories compare with Asian and Native American views of illness and health?

  Fulfillment of grenouille perfect human effluvium

The final moments of Perfume showcase the fulfillment of Grenouille's perfect "human effluvium." How did the extreme reaction of the crowd at the execution affect your observations about the novel?

  Do you feel that you are motivated more by maslows

In your role as a student, do you feel that you are motivated more by Maslow's lower-order or higher-order needs? describe how you expect this to change once you graduate?

  Personal reflection of own values to cultural safety

Personal Reflection of own values and attitudes to cultural safety in the provision of health care for Aboriginal and Torres Strait Islander peoples

  Discuss what errors or inconsistencies did detect

How did it compare to the book if based on a book is it recommend it, Discuss What errors or inconsistencies did detect

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd