Define all primary keys - foreign keys and data

Assignment Help PL-SQL Programming
Reference no: EM132059339

Given the attached physical schema in Assign2P18ERD undertake the following:

1. Using SQL Server create a database called Assign2P18

2. Define all primary keys, foreign keys and data

3. Populate the tables with sufficient data to adequately test all aspects of your queries.

4. Develop the SQL queries to satisfy the questions below.

No views should be employed here. While no question would require it you may use dynamic temporary tables as a technique.

1. Show for each species a count of the experts that are employed by zoos in the USA.

2. List the zoo name, employee name, salary and start date of each employee that is a world's best expert for a species. Sequence the output by employee name within zoo name.

3. Show the name of any country that has the more than 2 zoos.

4. Show for each zoo in Canada a count of animals held. Sequence the output by highest to lowest count.

5. Show for each zoo the number of different animal species it holds.

6. List the details for employees in Canadian zoos with a salary of at least 95000 or with an expertise in the Tiger species. Sequence the output by employee name.
7 List the details of zoos that hold more than 2 Lions born in captivity in 2016

8. List the details for the zoos in China that have more than 3 animals that belong to the Panda species.

9. List the names, gender, salaries and start dates of all male employees that are the world's best expert for an endangered species (status = E).

10. List the details for the zoo that has the employee with the highest salary in any zoo.

11. List the details for any species for which there are animals held in any zoo in China.

12. List the details for the zoos that have animals belonging to more than 4 different species.
Sequence the output alphabetically by zoo within city.

13. List details for the animals that have a mother that is held in a zoo that is different from their child's current zoo.

14. List the detail of animals that are in any zoo but whose mother is currently a Boston city zoo.

15. List the species details for the species that have a world's best expert working in a zoo in the USA that also holds animals of that same species. Show each species only once.

16. List the details for the tiger expert employee that has the highest salary for their expertise.

17. List the details for any endangered species which have 3 or more animals held in the "Metro Toronto" zoo.

18. List the details for all animals born in captivity in 2016 that belong to an endangered species (status = E).

19. Show the count of how many species experts are employed at the "Metro Toronto" zoo.

20. List the details of mothers that have more than 2 offspring that are held in Canadian zoos

Note: Queries that do not return sufficient data will lose marks. If no output is generated that query will receive a zero.

Reference no: EM132059339

Questions Cloud

What role finance has in your life : Define finance in your own words, what role finance has in your life, and what you hope to learn in this class.
Determining the area of the square : If the area of the square must be within 0.06 inches of 100 inches, then each piece of wire must be within how many inches of 10?
Marginal revenue mr changing : How fast is the marginal revenue MR changing when x = 90?
Considering the purchase of two new hot air balloons : Balloons By Sunset (BBS) is considering the purchase of two new hot air balloons so that it can expand its desert sunset tours.
Define all primary keys - foreign keys and data : Define all primary keys, foreign keys and data - Populate the tables with sufficient data to adequately test all aspects of your queries
Identify and describe the differences of case management : Identify and describe the differences of case management in the criminal justice system within the community and in a correctional setting.
What is the angular speed of wheel : A wheel with radius 10 inches covers a distance of 40 pi inches in one second. What is the angular speed of this wheel?
Compute the payback period for each project : Compute the payback period for each project and rank order them based on this criterion.
Products is considering project with five-year life : Western Industrial Products is considering a project with a five-year life and an initial cost of $110,000.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

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