Er diagram and database schema

Assignment Help Database Management System
Reference no: EM13120105

Objectives:

To analyse and comprehend a provided ER diagram and Database Schema

To implement a database based on the provided ER diagram and Database Schema

To write required SQL statements to query the database

Project Specification

The management team now require a partial implementation of the design made in Assignment 1. In order to keep consistency between the assignments, database specification containing the ER diagram and the schema is provided in this document. You should create your database according to this documentation. Please make sure that your implementation is consistent with this design. This means that your table names (upper case), field names (mixed case, no spaces) and data types have to be according to the specifications provided in this document. The implementation phase includeswriting SQL statements to create a database and its tables, populating the tables with data, writing a number of queries to create reports that can be used by the management team.  Your database should contain sufficient data in each table (5 - 10 records in each table) to demonstrate that your queries work.

Implementation of the Database

To implement the database system, you are required to

a) provide SQL commands to create the database, its tables, the relationships of the tables

b) Create a text file called YourStudentId-Create.sql (format xxxxxxx-Create.sql) for example 2225991-Create.sql that will provide SQL commands to:

i. create a database called WareMart[YourStudentID] (egWareMart30011111)

ii. create all of the required tables for the database including their primary keys, foreign keys and the relationships of tables. 

c) Create a text file called YourStudentId-Insert.sql (format xxxxxxx-Insert.sql) for example 2225991-Insert.sql that willprovide SQL commands to:

i. Insert sufficient data into each table you have created to test the queries(at least 5 records in each table).

ii. You are required to include our full name as one of the clients; but you can provide fake details for your address.

d) Create a text file called YourStudentId-Queries.sql (format xxxxxxx-Queries.sql - for example 2225991-Queries.sql) that contains all of the queries to display the following reports:

  1. An alphabetically sorted list of all clients. Only client number and name are required.
  2. List of names and complete address of all employees sorted by their salary.
  3. The date on which the most recent stock request has been made. The date itself will suffice.
  4. List of all the client names and their  residentialaddresses.
  5. A list of all clients that have not placed a stock request yet. Displaying client number will be sufficient.
  6. A list containing the name (surname and first name) of any employee that has picked any product(s) for a stock request.
  7. A list containing the total quantity on hand for each product (product no and description) regardless of warehouses and location.
  8. A list showing each product requested on each client stock request. Show client name, product number and quantity requested. sorted by client name and then product number.
  9. A list of employees (surname and first name are sufficient) and their salary for all employees whose salary is less than or equal to average salary.
  10. A list of employees as in question 9, but show their salary with a 7.5% increase.

1.   A list of all products (product number and description) and the quantity on hand for that product for each location at which it is stored within each warehouse. Sort it by product number and then place all locations (warehouse number and location number) for a given product together.

2.   A list showing product number, the quantity requested, the quantity picked and the difference between the two. For products stored in more than one location within a warehouse the quantities should be added together.

3.    A list of supervisors (staffid, surname and first name) and all of their subordinates (staffid, surname and first name).

 Note:There are some general requirements when defining your select queries:

You are required to adhere to the following output formatting conventions:

  • Any query requiring names of people should be printed as GivenNameFamilyName (e.g. John Smith) in a column labelled NAME
  • Any query requiring addresses should be printed as Street, Suburb State Postcode (e.g. 123 Anzac Pde, Maroubra NSW 2038) in a column labelled ADDRESS
  • All monetary values should be printed with a dollar symbol ($), two digits after the decimal point, and with space for 7 digits before the decimal point
  • You must use consistent and legible formatting in laying out your SQL queries. Include (brief) comments for any query or procedure that uses an "unusual" approach.

Reference no: EM13120105

Questions Cloud

Find out the average resistance force exerted on him : A 80 kg diver steps off a 13 m tower and drops from rest straight down into the water. If he comes to rest 4.1 m beneath the surface, find out the average resistance force exerted on him by the water.
Illustrate what would be your weight on the surface : If you weigh 670 on the earth, illustrate what would be your weight on the surface of a neutron star that has the same mass as our sun and a diameter of 19.0?
Which city is at the higher elevation : The boling point of water in city a is 94 degrees celcius and in city b it is 97 degrees celcius. which is at the higher elevation.
Determinable values be reported at fair market value : The single audit requirements apply only to state and local governments. Private not-for-profits do not have to comply with these requirements, even if they receive federal grants.
Er diagram and database schema : To analyse and comprehend a provided ER diagram and Database Schema and implement a database based on the provided ER diagram and Database Schema
Computing discriminant and solutions to quadratic equation : How many solutions exist for a quadratic equation? How do we determine whether the solutions are real or complex? Translate the following into a quadratic equation, and solve it, showing your work:
What pressure will the air exert : A 370. mL air sample collected at 35°C has a pressure of 550. torr. What pressure will the air exert if it is allowed to expand to 425 mL at 49°C.
Find probability of payment before creation of credit policy : Probability of payment before creation of credit policy, Mucklehoney Sports operates a mail-order running shoe business.
Prepare journal entries to record transactions : Purchased raw materials at a cost of $45,000 and general factory supplies at a cost of $13,000 on account (recorded materials and supplies in the materials account)

Reviews

Write a Review

Database Management System Questions & Answers

  Prepare a dfd and context diagram for the system

Journal entries have to be reconciled with the spreadsheet on a daily basis - Prepare a context diagram for the system and also prepare a diagram 0 DFD for the system

  Find maximum salary of employees from database table

Find the maximum salary of all employees who are not managers. Give all the managers in the database a 10 percent salary raise. Give all the other employees a 5 percent salary raise.

  Evaluate a dbms in terms of lock granularity

Suppose you are asked to evaluate a DBMS in terms of lock granularity and the different locking levels. Create a simple database environment in which these features would be important.

  Describe binary lock function

Describe relationships with example. Also illustrate degree of relationship for that example. What do you mean by locks. Write dow a binary lock function.

  Explain thoughts on database design process

Explain thoughts on database design process this far. You have learned about first three phases of process: defining mission statement and mission objectives, analyzing current database, and creating data structures.

  Sketch diagram for data warehouse of shop by star schema

Assume that data warehouse for video game shop consists of th three dimensions: time, player, and game, and two measures number of games played and price paid per game. Sketch schema diagram for data warehouse using the star schema.

  Select suitable statistical measure to compare consistency

Select an appropriate statistical measure to compare consistency of sales. Make the calculations and write a report. In your calculations, include the mean sales for each salesperson.

  Access values through queries to databases

However, the only way you can access values is through queries to the databases. In single query, you can specify value k to one of two databases.

  Write names-e-mail addresses for customers by foreign key

Illustrate all data in each of the four tables. Don't show foreign key columns. Write down the names and e-mail addresses for all customers who have had stove repair which cost more than $50.

  Design a database schema

Design a Database schema

  Create link list in adt to maintain employee information

Create a link list in ADT c to maintain employee information like name,empid,basic salary and address.1.add employee info to the list if the empid is valid.

  Describe entity-relationship model

Describe the entity-relationship model. How are entities, relationships, and attributes represented in this model? What is a composite entity? Describe the approach to diagrams that uses a crow's foot.

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