For this assessment, you will be creating an entity-relationship (ER) model, databases, tables, and queries for two fictional small businesses. To complete this assessment, you will use SQL to test and run a database application that you will develop. After running the code, you will take a screenshot of your results and paste the screenshot into a document that you will submit.
The work you complete for each part of the assessment (i.e., the design models and diagrams, tables, written explanations, SQL script code, and screenshot results from running your SQL scripts in a SQL tool) should be saved as a single PDF file that you will submit.
Note: If you do not have access to a database tool, you may use SQL Fiddle (an online SQL tool) to complete this assessment. The tool can be accessed using the "SQL Fiddle" link in the Web Links section of this task. Instructions for how to use SQL Fiddle for each part of the assessment are included in the attached document SQL Fiddle Instructions. Please note that for each part of the assessment, there are explicit instructions on what SQL code you will need to copy and paste into the SQL Fiddle panels to run your test.
You are a database designer and developer who has been hired by two local businesses, Nora's Bagel Bin and Jaunty Coffee Co., to build databases to help them manage their businesses. First, you will design a normalized physical database model to store data for Noras Bagel Bins ordering system. Then, you will use an existing database design document for Jaunty Coffee Co. to create its database. Once the tables have been built, you will load them with sample data and create a view and an index to protect and improve query performance. Finally, you will create both a simple query and a more complex table joins query to produce meaningful reports from the newly created database.
A. Construct a normalized physical database model to represent the ordering process for Nora's Bagel Bin by doing the following:
Note: Before proceeding, familiarize yourself with the ordering process for Nora's Bagel Bin by reviewing the following documents in the Supporting Documents section of this task: the shops unnormalized sales order form ("Bagel Order Form") and the first normal form (1NF) provided in the Noras Bagel Bin Database Blueprints.
1. Complete the second normal form (2NF) section of the attached "Nora's Bagel Bin Database Blueprints" document by doing the following:
2. Complete the third normal form (3NF) section of the attached "Nora's Bagel Bin Database Blueprints" document by doing the following:
3. Complete the "Final Physical Database Model" section of the attached "Nora's Bagel Bin Database Blueprints" document by doing the following:
B. Create a database using the attached "Jaunty Coffee Co. ERD" by doing the following:
1. Develop SQL code to create each table as specified in the attached "Jaunty Coffee Co. ERD" by doing the following:
2. Develop SQL code to populate each table in the database design document by doing the following:
Note: This data is not provided. You will be fabricating the data for this step.
3. Develop SQL code to create a view by doing the following:
4. Develop SQL code to create an index on the coffee_name field by doing the following:
5. Develop SQL code to create an SFW (SELECT-FROMWHERE) query for any of your tables or views by doing the following:
6. Develop SQL code to create a query by doing the following: