Ask DBMS Expert


Home >> DBMS

Database - Assignment

Background

You will be working with a set of tables for a mobile. To access these tables in oracle create the following synonyms:

SQL> CREATE SYNONYM ANIMAL FOR VBRUNO.ANIMAL;

SQL> CREATE SYNONYM KEEPER FOR VBRUNO.KEEPER;

SQL> CREATE SYNONYM CAGE FOR VBRUNO.CAGE;

SQL> CREATE SYNONYM SPECIE FOR VBRUNO.SPECIE;

SQL> CREATE SYNONYM FED FOR VBRUNO.FED;

SQL> CREATE SYNONYM FOOD FOR VBRUNO.FOOD;

Assignment Exercise

You are to prepare 15 SQL query statements that will provide answers to the following 15 requests for information.

You must submit the syntax of the queries themselves, not all the output.

1. Show a list of all the "Female" animals, that are "White", and are located in a cage whose location starts with an "A", "B", or "V". Just show the name of the animal.

2. Create a list of animals that are "Brown" in colour and less than 2 years old. Show the animal name and species name.

3. Create a view that lists all the animals that eat "straw". Show the animal no, animal name and scientific name.

4. Show the detail for cage number 147, also show the name of the animals in this cage, along with the keeper that looks after the cage, and the keeper that looks after each animal in the Include the species name for each animal in cage.

5. List all keepers from a suburb that has "WEST" in the name, who look after White animals from the snakes species. Show the keeper's full name and the animal name.

6. List all keepers that earn more than $37,000 a year at the zoo. Show the keepers name, the total salary for a year (assume 38hrs week) and the number of years they have worked at the zoo.

7. List all the cages whose size is "S"mall. Show the cage details and the name of the keeper who cleans it.

8. List all the cages that do not have any animals in them. Show all the cage details.

9. List for each MONTH of the year, how many animals are having their birthday.

10. List each of the keepers who are both vets and cleaners (‘A'). Show the keeper's name, age, how long they have worked at the zoo and their supervisor's name.

11. Create a list of each food bought by the zoo and a sum of the total quantity of each food used per day.

12. Show all the cages with six animals or more. Show the cageno, cage size, cage cost and cage location along with the keepers full name who cleans the cage.

13. For each keeper, show the number of cages cleaned by the keeper and the total cost of the cages cleaned for each keeper. Make sure you show the keeper's name. Show the highest total cost first and the lowest last on the list.

14. Need to show all the details related to a particular cage, just like in question 12, except that it must be the cage(s) that has the MOST animals in it only.

15. Create your own query. It must include a nested query. Submit the following:

a) question your query is answering

b) the SQL query

2176_Table description for the zoo database.png

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91420702
  • Price:- $80

Priced at Now at $80, Verified Solution

Have any Question?


Related Questions in DBMS

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As