Objectivesto analyse and comprehend a provided er diagram

Assignment Help Database Management System
Reference no: EM13375177

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.

1415_Implement a database based on the provided ER diagram.png

2. Relational Database Schema

WAREHOUSE

Column name

Data type

Comments

warehouseID

VARCHAR(3)

Primary key

street

VARCHAR(20)

 

city

VARCHAR(15)

 

state

VARCHAR(3)

Examples - VIC, NSW, QLD

postcode

VARCHAR(4)

Examples - 3350, 2001, 3001

managerID

INT

FK - References MPLOYEE.StaffID

EMPLOYEE

Column name

Data type

Comments

staffID

INT A_I

Primary key

surname

VARCHAR(20)

 

firstName

VARCHAR(15)

 

dob

Date

Short date - Example 06/09/1982

street

VARCHAR(20)

 

city

VARCHAR(15)

 

state

VARCHAR(3)

Examples - VIC, NSW, QLD, TAS

postcode

VARCHAR(4)

Examples - 3350, 3355, 2001, 3001

salary

Decimal(19,4)

 

warehouseID

VARCHAR(3)

FK - References AREHOUSE.warehouseID

supervisedBy

INT

FK - References MPLOYEE.StaffID

LOCATION

Column name

Data type

Comments

warehouseID

VARCHAR(3)

Primary key  - Examples W01, W02

FK - References WAREHOUSE. warehouseID

locationID

VARCHAR(3)

Primary key -Examples L01, L02

Aisle

INT

 

Shelf

INT

 

Bin

INT

 

capacity

Double

Capacity in cubic meters

PROD_LOCATION

Column name

Data type

Comments

warehouseID

VARCHAR(3)

Primary key

FK - References WAREHOUSE. warehouseID

locationID

VARCHAR(3)

Primary key

FK - References LOCATION. locationID

productNum

INT

Primary key

FK - References PRODUCT. productNum

quantityOnHand

INT

 

PRODUCT

Column name

Data type

Comments

productNum

INT A_I

Primary key

description

VARCHAR(30)

 

packSize

INT

 

Price

dptNumber

 

 

Decimal (10,2)

INT

 

FK - References DEPARTMENT.dptNumber

DEPARTMENT

Column name

Data type

Comments

dptNumber

INT A_I

Primary key

dptName

VARCHAR(20)

 

CLIENT

Column name

Data type

Comments

clientNum

INT A_I

Primary key

clientName

VARCHAR(40)

 

CLIENT_ADDRESS

Column name

Data type

Comments

clientNum

INT A_I

Primary key

FK - References CLIENT.clientNum

addressType

VARCHAR(1)

Primary key. Expected examples 'R' for residential, 'M' for main and 'P' for postal

street

VARCHAR(20)

 

city

VARCHAR(15)

 

state

VARCHAR(3)

Examples - VIC, NSW, QLD

postcode

VARCHAR(4)

Examples - 3350, 2001, 3001

STOCK_REQUEST

Column name

Data type

Comments

requestNum

INT A_I

Primary key

requestDate

Date

Short date - Example 06/09/2012

clientNum

INT

FK - References CLIENT.clientNum

REQUEST_LIST

Column name

Data type

Comments

requestNum

INT

Primary key

FK - References STOCK_REQUEST.requestNum

productNum

INT

Primary key

FK - References

PRODUCT.productNum

qtyRequested

INT

 

PICKING_LIST

Column name

Data type

Comments

warehouseID

VARCHAR(3)

Primary key.

FK - References WAREHOUSE. warehouseID

locationID

VARCHAR(3)

Primary key.

FK - References LOCATION. locationID

productNum

INT

Primary key.

FK - References PRODUCT. productNum

requestNum

INT

Primary key.

FK - References STOCK_REQUEST.requestNum

quantityPicked

INT

 

datePicked

Date

Short date - Example 06/09/2014

pickerStaffID

INT

Foreign Key - References EMPLOYEE.staffID

 

Reference no: EM13375177

Questions Cloud

Question 1nbspa large scale marketing survey was conducted : question 1.nbspa large scale marketing survey was conducted. some of the variables collected weregender nbsp
Prisoners at a state penitentiary took several prison staff : prisoners at a state penitentiary took several prison staff members as hostages during a riot at the prison. following
Taskeach group will have a research topic which the group : taskeach group will have a research topic which the group will be responsible for researching and presenting on to the
Think of a situation in which you or someone you know have : think of a situation in which you or someone you know have been involved in a breach a contract. what happened? was
Objectivesto analyse and comprehend a provided er diagram : objectivesto analyse and comprehend a provided er diagram and database schemato implement a database based on the
Give a few short paragraphs to answernbspch14 q8 - explain : give a few short paragraphs to answernbspch14 q8 - explain the traditional collection process in the banking system and
Is the judicial system effectivedoes the punishment always : is the judicial system effective?does the punishment always fit the crime?how serious a problem is racial profiling?how
Court visit paper you must visit a trial or appellant court : court visit paper you must visit a trial or appellant court anywhere in the world for approximately 2 hours. you need
Task requirement1 for all questionsaccording to the : task requirement1. for all questionsaccording to the background discussion write 150-200 or more words response for

Reviews

Write a Review

Database Management System Questions & Answers

  Analyse and comprehend a provided er diagram

Analyse and comprehend a provided ER diagram and Database Schema and to implement a database based on the provided ER diagram and Database Schema

  Find average number of books borrowed per member

Find the average number of books borrowed per member. Take into account that if a member does not borrow any books, then that member does not appear in the borrowed relation at all.

  Question accountants will use data flow diagrams dfds to

question accountants will use data flow diagrams dfds to depict the physical flows of data through an ais like document

  Draw an entity relationship diagram for the system

Draw an Entity Relationship diagram for the system and Identify the table design for the database displaying all the fields/attributes. Ensure that all tables are in 3NF. You also need to identify the primary keys and foreign keys, where applicable..

  Database containing student info

Create a database containing student info (name, age, ect.).Find a way to allow the user to search the database using a students name and allowing them to delete that students information.Use binary input/output to take the input from the user for th..

  Knowledge and data warehousing adventure works cycles the

knowledge and data warehousing adventure works cycles the fictitious company on which the adventureworks sample

  Ray henry is considering expanding the inventory at his

ray henry is considering expanding the inventory at his book stores to include movies. he has some special ideas for

  Create state transition diagram to describes student states

Create a state transition diagram that describes typical student states and how they change based on specific actions and events.

  Various kinds of keys to form or define relationships

Relational database is based on fact that data in one table can be tied, or related to data in another table. To do this, database utilizes various types of keys to form or define these relationships.

  Draw a context diagram for the order system

Kitchen Gadgets sells a line of high-quality kitchen utensils and gadgets. When customers place orders on the company's Web site or through electronic data interchange (EDI).

  Program to build a database concerning employee information

Company XYZ needs a program to build a database concerning employee information.

  Write down subquery to sort result in descending order

Write down your subquery MAX_CALC_SAL. Name columns in result JOB_TITLE and JOB_TOTAL, and sort result on JOB_TOTAL in descending order.

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