Implement a database based on the provided er diagram

Assignment Help Database Management System
Reference no: EM13747958 , Length: word count:1000

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

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 BigM[YourStudentID] (eg BigM30011111)

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 will provide SQL commands to:

i. insert sufficient data into each table you have created to test the queries (at least 5 to 10 records in each table; some table may require less or more).

ii. You are required to include your full name as one of the employee and/or customer; but you can provide fake details for your address and contact.

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. List of names and complete address of all employees sorted by their salary. Also indicate if the employee works fulltime or casual.

2. The date on which the most recent customer order has been made. The customer name and date of order will suffice.

3. List of all the store names and their addresses, sorted in dictionary order of the store name.

4. A list of all customers that have not placed an order yet. Displaying customer number and name will be sufficient.

5. A list containing the name of employees, which work as accountant.

6. A list containing the total quantity on hand for each product (product no and description) regardless of stores.

7. A list showing each product sold (picked) on or before May 20, 2015. Show product number, name and quantity sold, sorted by product number and then quantity sold.

8. A list of CDs (show CD title, release date and price) whose price is less than or equal to the average CD price.

9. Increase each fulltime employee's salary by 7.5% and show the updated salary of all fulltime employees (name and salary).

10. Show all the artist names and CDs in which they appear, sorted by artist first name and then by last name and finally by CD title.

Problem (note: edited from the above source. Please take it as an example, not an exact implementation for the assignment's supertype-subtype relationships):

I need to create the following database:

Vehicle can be semi-trucks and cars. For semi-trucks I don't need extra subtypes, while for Car I need to have only 3 subtypes (Van, Suv and Sedan) and also for Sedan I need the four subtypes (Gas, Diesel, Hybrid and Electric). For SELECTs I will use JOINs (normalized database) but I need to find an easy way to make correct INSERTs.

- Vehicle table stores common information

- Semi-truck stores specific information for semi-trucks

- Car tables has specific fields for cars and a car_type field which is linked to the three subtypes

- Van, Suv and Sedan (and other types if I would need them) should be in one table CAR_TYPE

- However, for Sedan type I need to have additional subtypes which maybe should be contained in another table. These subtypes are not needed for Suvs and Vans (in real life suv, vans can have the same subtypes as sedans but not in my case).

So far, my first approach is to have the following tables:

- Vehicle: veh_id, veh_type(Semi, car), ..., other_fields
- Vehicle_semis: veh_id, ..., other_semis_fields
- Vehicle_car: veh_id, car_type(Van, Suv, Sedan), other_car_specific_fields
- Car_type: car_type_id, type
- Sedan_type: sedan_type_id, type

Reference no: EM13747958

Questions Cloud

Formulate the lp problem to determine the optimum production : Formulate the LP problem to determine the optimum production schedule that minimizes the total costs.
Patterns in human inheritance traits : Patterns in Human Inheritance Traits-Is your hypothesis supported by the findings? What statistical tool might help you to make this decision
How to submit your american art project : How to Submit Your American Art Project? What is the artist trying to portray with the image? What feelings is he trying to evoke?
Discuss organizational interventions to recommend : Discuss organizational interventions to recommend. Take into consideration your previous diagnosis and the emotional state of your employees from your interview.
Implement a database based on the provided er diagram : Analyse and comprehend a provided ER diagram and Database Schema - To implement a database based on the provided ER diagram and Database Schema.
Find out the taxable income : Tom and Linda are married taxpayers who file a joint return. They have itemized deductions of $12,250 and four exemptions. Assuming an adjusted gross income of $40,000, what is their taxable income for 2012?
What is the prognosis on genetic diseases : What is the prognosis on genetic diseases in the future? Do you believe that microsurgery to "fix" chromosomal aberrations will someday prevent the diseases that are listed in the List of Genetically Mediated Diseases in Humans
Compare and contrast the risk assessment methodologies : Compare and contrast the following risk assessment methodologies: (a) the Delphi technique, (b) sensitivity analysis, and (c) Monte Carlo simulation. Provide a rationale for your response.
Number of residential mortgages in the portfolio : The number of residential mortgages in the portfolio and the range of principal values, interest rates, and maturities

Reviews

Write a Review

Database Management System Questions & Answers

  Determine the cartesian product of sets

Determine the Cartesian product (A X B) of the given pair of sets. A => Set of first letter of names of countries = A = { R, S, T } B => Set of numbers denoting Postal codes = B = { 0001, 1001}.

  List different entities-objects-logical processes-data flows

List the different entities or objects, logical processes, data flows, and data stores that are involved, starting from the time you submitted your time sheet.

  Find entity relationship and relational database modelling

You are required to design (using an E-R diagram) an entity-relationship model of the problem, convert the model into a relational model, and assess the normal form of each schema.

  Explain implementing its erp system

As an external consultant, you have been hired by Overstock.com to evaluate the effectiveness of the processes they undertook in implementing its ERP system and to present your evaluation in report format to the CEO Patrick Byrne

  Write a program to calculate the tax of an employee

Write a program to calculate the tax of an employee whose employee number is input from the keyboard. Display an appropriate error message if the data does not exist in the Emp table.

  Explain what do business rules require to be effective

What are the advantages of having the DBMS between the end user's applications and the database. What are some reasons for studying file systems. IT 645 - Database Management Systems

  Create a new test02 class

Write a toString method that will return a String containing all the relevant data for each of your objects.

  Evaluate product costs for external financial reports

The total amount of overhead cost allocated to Product X would be closest to - Andris Corporation uses activity-based costing to determine product costs for external financial reports

  Represent data for sales of individual stores

Explain how you will visually represent the data for the sales of the individual stores and for the time period shown. You want to show the change in sales for each store over time for the past three years.

  Estimated costs and expected activity

Abel Company uses activity-based costing. The company has two products - estimated costs and expected activity

  Explain how data is physically stored and accessed

Write clearly and concisely about relational database management systems using proper writing mechanics and technical style conventions.

  Consider the following set of database tables same tables

consider the following set of database tables same tables from assignment 6-1. please take note of foreign keys most of

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