Answered You can buy a ready-made answer or pick a professional tutor to order an original one.
iLab 3 of 4: The Week 5 iLab: Database Construction Using MySQL ( 50 points)
iLab 3 of 4: The Week 5 iLab: Database Construction Using MySQL ( 50 points)
Note!
Submit your assignment to the Dropbox, located at the top of this page.
(See the Syllabus section "Due Dates for Assignments & Exams" for due dates.)
iLAB OVERVIEW
Scenario/Summary
In this assignment, you will learn to create a Database Schema from a given ERD. To complete this assignment, you will need to be able to run MySQL via Omnymbus.
Please ensure that you can connect to MySQL/Omnymbus. Consult with the document titled MySQLOmnymbusSupport.docx located in the Doc Sharing folder titled Omnymbus Tutorial Files for instructions. Contact your instructor for help for any issues that you are having with the MySQL/edupe Environment.
Deliverables
SQL script file named LastName_Wk5.sql. That is a txt document with the .sql extension. A text document named LastName_Wk5_Output.txt. When you are done submit them to the Week 5: iLab Dropbox. Files that have been opened or processed by any software than Notepad are not acceptable. Zipped files are not acceptable and may be returned ungraded.
Required Software
Omnymbus – MySQL in the edupe environment. SQLZOO may be used to test the scripts.
Access the software at https://devry.edupe.net:8300.
Steps 1–8
iLAB STEPS
STEP 1: Entity Relationship Diagram Analysis
Review the ERD below to understand the entities, attributes, primary keys, and relationships that you will create in your MySQL database.
STEP 1: Create a New Database
· Create a new database following the naming conventions we are using for our databases, as specified in the tutorial file Creating a Database within MySQL.pdf listed in the doc-sharing folder titled “Omnymbus Tutorial Files” in Doc-Sharing. All of our work in this iLab, will be done under this database.
STEP 2: Create SQL File
- To reference, learn and apply MySQL’s own dialect of the SQL language to this iLab, browse through the file M10C_KROE8352_13_SE_WC10C.pdf in the Doc Sharing folder titled My SQL Documents.
- Create a script file named LastName_Wk5.sql containing SQL statements created in Steps 3–7 below.
- But first include the following commands at the top of your script:
- SET FOREIGN_KEY_CHECKS=0;
- DROP TABLE IF EXISTS STUDENT;
- DROP TABLE IF EXISTS CAMPUS;
- DROP TABLE IF EXISTS ROOM;
- DROP TABLE IF EXISTS COURSE;
- DROP TABLE IF EXISTS INSTRUCTOR;
- DROP TABLE IF EXISTS APPROVED_INSTRUCTOR;
- DROP TABLE IF EXISTS CLASS;
- DROP TABLE IF EXISTS STUDENT_GRADE;
- SET FOREIGN_KEY_CHECKS=1;
STEP 3: Add Tables, Set Primary Keys and Foreign Keys
Add tables to the MySQL database.
- Add a table for each entity listed in the provided ERD diagram.
- Add a column for each attribute listed in the provided ERD diagram.
- Select primary key for each table as indicated in the provided ERD diagram.
- Identify foreign key relationship between tables as indicated in the provided ERD diagram.
- Enable referential integrity on the relationship.
- Enable cascade updates on the relationship.
STEP 4: Set Data Types for Table Fields
For every column in every table, update the data type as needed to enforce the domain constraints of the data.
- Dates should have a date data type.
- Surrogate keys should be auto-numbered.
- Numeric data should have a numeric data type.
- Character data should have a character data type.
STEP 5: Set Column Constraints
Set the following column constraints in your database.
- Student first and last name cannot be a null value.
- Course credit hours must be between one and four.
- Course name must be unique and cannot be a null value.
- Instructor first and last name cannot be a null value.
- Grade must be one of these values: A, B, C, D, F, I, W, or E. W signifies withdrawn and E signifies enrolled.
STEP 6: Add Data to Tables
Write INSERT statements to add at least 2–3 rows of data to each table in your database. Use any values that you like for each of the columns. Remember that you must add data to parent tables before adding data to child tables, because referential integrity is enabled.
STEP 7: Run the Script
- Include a COMMIT command at the end of the script.
- Include SHOW TABLES command at the end of the script, to show all tables created.
- Include SELECT statements for each table at the end of the script, to show data inserted.
- Give your script a run, by uploading into Omnymbus and executing it just like you did in iLab1.
- Paste a copy of the output in a MS Word document named LastName_Lab3_Output.
Step 8: Save and Upload to Dropbox
When you are done, submit the following files to the Week 5: iLab Dropbox:
- LastName_Wk5.sql A text file you created with Notepad
- LastName_Wk5_Output.txt A text file created by copy and paste from edupe.
Rubric
Points will be awarded according to the following rubrics.
- 5 points: Table created for each entity in the provided E-R model
- 5 points: Column created for each attribute in the provided E-R model
- 5 points: Primary key added for each table with unique constraints specified as column properties
- 5 points: Data type set for each attribute
- Dates should have a date data type.
- Surrogate keys should be autonumbered.
- Numeric data should have a numeric data type.
- Character data should have a character data type.
- 10 Points: Relationships created as shown on the provided E-R model
- Relationships enabled for referential integrity
- Relationships enabled for cascade updates.
- 10 Points: At least five rows of data added for each table
- 10 Points: Column constraints added as indicated in project description, checked by adding rows to data with invalid values
- Student name cannot be set to null.
- Course credit hours are restricted to between one and four.
- Course name must be unique and cannot be set to null.
- Instructor last name and first name cannot be set to null.
- Grade is restricted to be one of these values: A, B, C, D, F, I, W, or E (enrolled).
- @
- 331 orders completed
- ANSWER
-
Tutor has posted answer for $35.00. See answer's preview
**** * ** ***** **** * ***** Database ************ ***** ***** * 50 ****************** your ********** ** the Dropbox ******* at the top ** **** ******** *** ******** section **** ***** *** Assignments ***** Exams" for *** dates)iLAB OVERVIEWScenario/SummaryIn this assignment *** **** ***** ** ****** * ******** ****** **** * given *** ** ******** **** assignment you **** **** ** ** able to run ***** *** OmnymbusPlease ****** **** *** can ******* to ************** ******* **** *** document ****** ************************ located in *** Doc ******* ****** ****** Omnymbus ******** ***** *** ************ ******* **** instructor *** help *** *** ****** that *** *** ****** **** the *********** ************************** ****** **** ***** LastName_Wk5sql **** ** * *** ******** **** *** *** ********* * **** document ***** ********************** When *** are done ****** them ** the **** ** **** ******* Files **** have **** opened ** processed ** *** ******** **** Notepad are not acceptable ****** files are *** ********** *** *** ** returned **************** ************************ ** the ***** environment SQLZOO *** ** **** ** **** *** ************* the software ********************************* ********* STEPSSTEP ** ****** ************ Diagram ************ to Top Review the ERD ***** to understand the ******** ********** ******* **** and ************* that *** **** ****** ** **** MySQL databaseSTEP ** ****** * *** ********** ****** * new ******** following *** ****** *********** ** *** ***** *** our ********* as ********* ** the tutorial **** Creating a ******** ****** MySQLpdf ****** ** the doc-sharing folder ****** *********** Tutorial ******** in *********** *** ** *** **** ** **** **** **** be done under this databaseSTEP ** ****** *** FileBack to ***** ********* ***** *** ***** ********* *** dialect of *** *** language ** **** **** ****** ******* *** **** M10C_KROE8352_13_SE_WC10Cpdf in *** Doc ******* ****** ****** ** *** DocumentsCreate * ****** **** ***** *************** containing *** ********** ******* ** ***** ***** ******** first include *** ********* ******** ** *** *** of your ********** FOREIGN_KEY_CHECKS=0;DROP ***** IF ****** ************ ***** ** ****** *********** TABLE ** ****** ********* ***** ** EXISTS *********** ***** ** ****** *************** ***** ** ****** ************************ ***** ** ****** ********** ***** IF ****** ***************** ************************* ** *** Tables *** ******* **** *** Foreign KeysBack ** ****** tables ** *** ***** *********** a ***** *** each ****** ****** in the ******** *** ********** a ****** for **** ********* ****** in *** ******** *** diagramSelect ******* *** for each table as ********* in *** provided *** *************** foreign *** ************ ******* ****** as ********* ** *** provided ERD ************* referential ********* ** *** ****************** ******* ******* on *** relationshipSTEP 4: *** **** Types for ***** FieldsBack ** ****** ***** column in ***** ***** ****** *** **** **** as ****** ** ******* the ****** *********** ** the dataDates should **** a **** **** ************* **** ****** ** ******************** **** ****** have * ******* **** ************* **** ****** **** * character **** ******** ** *** ****** *************** to ****** *** ********* ****** constraints ** your *************** ***** *** **** **** ****** ** * **** valueCourse ****** ***** **** ** ******* *** *** ********** **** must ** ****** *** ****** ** * **** valueInstructor ***** *** last **** ****** be * **** valueGrade **** be one of these values: * * * D * I * ** E W ********* ********* *** * signifies enrolledSTEP 6: *** Data ** ********** ** TopWrite ****** ********** ** *** ** ***** ***** **** ** data ** **** ***** ** **** ******** *** *** ****** **** *** like *** each ** *** ******* ******** **** *** **** *** **** ** parent ****** ****** ****** **** ** child ****** because referential ********* ** *********** ** *** *** ********** to ************ * ****** ******* at *** end of *** ************* SHOW TABLES ******* ** the *** ** *** script ** show *** ****** ************** ****** ********** *** **** table ** *** *** of the ****** to **** **** insertedGive **** ****** a *** ** uploading into ******** and executing ** just **** *** did in ********** a **** ** the output ** * MS Word ******** ***** ************************ ** Save *** ****** ** DropboxBack ** ******* *** *** **** submit *** ********* files ** the **** 5: iLab Dropbox:LastName_Wk5sql * **** **** *** ******* **** ***************************** * text **** ******* by **** and paste **** *************** ** ********* will be ******* ********* ** *** ********* rubrics5 points: ***** ******* for **** ****** ** *** provided E-R ****** ******* ****** ******* *** each attribute ** *** ******** *** model5 ******* ******* key added *** **** ***** with unique *********** ********* ** ****** *********** ******* Data **** set *** each ************** should have a **** data typeSurrogate **** ****** ** ******************* **** ****** have * ******* data ************* data ****** **** * ********* **** ****** ******* ************* ******* ** ***** ** *** ******** *** ****************** ******* for referential ********************** ******* *** ******* updates10 ******* ** ***** **** **** ** **** ***** *** **** ******* ******* ****** *********** ***** ** indicated ** ******* *********** checked by adding **** to data **** ******* valuesStudent name cannot ** set ** ********** credit ***** *** ********** to between one and ********** **** **** ** ****** *** ****** be *** ** ************** **** name and ***** **** ****** be *** ** ********* ** restricted ** ** *** ** ***** values: * * * * F I * ** * **********