Part 1- Introduction The report contains the...
ITECH 1006 Database Management Systems Editing Services
For this assignment you will implement and query a database from a supplied ER Diagram and Schema. You will be required to write the SQL statements to create the database structures, to fill the database with data and to run queries on the data.
Learning Outcomes Assessed
The following course learning outcomes are assessed by completing this assessment:
- Design and implement a relational database using a database management system
- Utilise a query language tools and techniques to obtain data and information from a database
- Describe relational algebra and its relationship to Structured Query Language (SQL)
- Interpret entity-relationship diagrams to implement a relational database
- Demonstrate skills in designing and building a database application using a commercially available database management system development tool
- Use a query language for data manipulation
BHE Holdings has provided you with a standard solution for the conceptual data model (the ER diagram). You have been commissioned to continue your role (in your capacity as a Database Management System consultant) and to write the SQL statements to create the database and its tables, add data, and provide answer to some of their everyday queries. The database system should be created based on the ER diagram provided at the end of this document. Some sample data are also provided to be used for inserting data to tables. You are required to insert sufficient data to test the reports given below.
To implement the database
- Translate the ER diagram provided into a relational schema using the correct notations and standards for this course. It should include:
- Table names
- Attribute names and field types (as required by XAMPP)
- Primary and foreign keys identified
2. Create a text file called nnnn_create.sql (where nnnn is your student number). The file should include:
- The SQL statements to create a database called BHE_Holdings_nnnn.txt (where nnnn is your student ID)
- The SQL statements to create the tables and the relationships between them.
3. Create a text file called nnnn_insert.txt (where nnnn is your student number). The file should include:
- The SQL statements to load sufficient data into each table you have created to test the queries given below. Sample data has been provided, but you will need to include further data test the requirements. You should add at least one record to the existing test data for each table.
- You are requiredto include your name as one of the customers (you don’t have to have your address if you don’t want to), but you MUST have your name and give your student id as the phone number.
4. Create a text file called nnnn_query.txt (where nnnn is your student number). The file should include the SQL statements necessary to display the following reports:
- List all details of all the records in the customers table, sorted by postcode in descending order.
- List all the titles of all the items in inventory with their supplier’s name, email, phone number and postcode.
- List all the actors who are deceased. Print their name as ONE column with a suitable heading, their date of birth and their date of death.
- List all of the inventory by genre. Display the title and the genre of each.
- List all the movies in the shop in alphabetical order. Include movie name, genre, classification, star rating and director name.
- List all genres that have no titles.
- Delete the all customers from Beaufort.
- Change customer Mary Spring's name to Mary O’Sullivan.
- List all the movie titles with their cast and their director. Print the name of the actors and the directors in one column for each with an appropriate title.
- Insert a game with the title "Faraway Stars" (genre scifi) published by Moonstruck Games in 2016. The company is located at 1020Oak Dr, Longwood, 3546, email email@example.com, phone 4561327895, and contact is Jessie Fandango. The wholesale price is $38 and the mark up is 40%. The shop has 13 in stock and there is no discount applicable to this item.
- List all the inventory with its title, its quantity on hand and its sales price (wholesale plus markup).
- List every item in inventory with its title, genre and whether it is a game or a movie.
Your documentation should include:
- A title page clearly stating your name and student ID and your tutor’s name.
- A copy of the relational schema you have developed from the ER diagram provided.
- A copy of the three files you are required to create included in the document (ie nnnn_create.txt, nnnn_insert.txt and nnnn_query.txt).
Full APA referencing of any resources you have used to complete your submission