Mis582 all Week I-lab latest 2017
Mis582 all Week I-lab latest 2017
Subject: General Questions / General General Questions
QuestionWeek 1 I-lab
Scenario/Summary
This week, you will learn to create and run SQL SELECT queries in the MySQL database. You will need to create a database in MySQL via Omnymbus, run a SQL script to create tables and insert data, create and execute SQL SELECT queries using the STUDENT table.
Please ensure that you can connect to MySQL/Omnymbus via the account your Professor has emailed to you. Please consult with the document titled MySQLOmnymbusSupport.docx ?located in the Doc-Sharing folder titled Omnymbus Tutorial Files for instructions on how to get help for any issues that you are having with the MySQL/Omnymbus Environment.
Listen
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read these step-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
SQL file named LastName_Lab1_Query.sql containing SELECT statements
Word document named LastName_Lab1_Output containing queries and output
Zip the files, and upload the zipped file to the Week 1: iLab Dropbox.
Listen
Required Software
Omnymbus – MySQL
Access the software at https://devry.edupe.net:8300
Steps: 1–4
Listen
Lab Steps
Listen
STEP 1: Logging in to Omnymbus
Look at your email account to obtain the MySQL/Omnymbus account and password that your Professor has emailed to you.
To help you log into MySQL Omnymbus environment, download the tutorial Login MySQL Omnymbus Environment in the Doc-Sharing folder titled “Omnymbus Tutorial Files”.
Listen
STEP 2: Create a Database and modify your script to reference your Database
Create a MySQL database:
Download the tutorial Creating a Database in MySQL Omnymbus Environment from the folder in Doc-Sharing titled Omnymbus Tutorial Files. Follow the steps to create a database in MySQL, especially paying attention to the database naming conventions specified in the tutorial.
Download the WeekOneiLabScript.sql file from Doc Sharing in the folder titled iLab Documents
Listen
STEP 3: Running script file in MySQL, create SQL SELECT Queries
Run scripts files in MySQL:
Download the tutorial Running SQL Scripts in MySQL Omnymbus environment from the folder in Doc-Sharing titled Omnymbus Tutorial Files. Follow those steps to help execute the WeekOneiLabScript.sql file needed to create the needed tables and to insert data into them.
Create SQL SELECT Queries:
Using the data in the Student table in the database, create a SQL script file named LastName_Lab1_Query.sql, containing queries to execute each of the tasks below.
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.
Save each query with a screen shot of the output in a MS Word document named Lastname_Lab1_Output.
Name Task
Query1 Write a SQL statement to display Student’s First and Last Name.
Query2 Write a SQL statement to display the Major of students with no duplications. Do not display student names.
Query3 Write a SQL statement to display the First and Last Name of students who live in the Zip code 82622
Query4 Write a SQL statement to display the First and Last Name of students who live in the Zip code 97912 and have the major of CS.
Query5 Write a SQL statement to display the First and Last Name of students who live in the Zip code 82622 or 37311. Do not use IN.
Query6
Write a SQL statement to display the First and Last Name of students who have the major of Business or Math. Use IN.
Query7 Write a SQL statement to display the First and Last Name of students who have the Class greater than 1 and less than 10. Use the SQL command BETWEEN.
Query8 Write a SQL statement to display the First and Last Name of students who have a last name that starts with an S.
Query9 Write a SQL statement to display the First and Last Name of students having an a in the second position of their first names.
Query10
Write a SQL expression to display each Status and the number of occurrences of each status using the Count(*) function; display the result of the Count(*) function as CountStatus. Group by Status and display the results in descending order of CountStatus.
Listen
STEP 4: Save and Upload to Dropbox
When you are done, zip the files Lastname_Lab1_Query.sql and Lastname_Lab1_Query_Output file and upload them to the Week 1: iLab Dropbox.
Listen
Rubric
Queries that are correct will be awarded the number of points shown below:
4 points: Query 1
5 points: Query 2 – 9
6 points: Query 10
The following rubrics will be used for incorrect queries:
0 points: Query was not turned in with the assignment.
-4 points: Query will not run.
-3 points: Query runs but is incorrect because query required a WHERE clause to meet requirements which was not included.
-2 points: Query runs but is incorrect because WHERE clause contained errors, gives popup for user input, or only meets partial requirements.
Week 3 I-lab
Scenario/Summary
In this assignment, you will learn to create a physical database model in Visio from a liste set of business requirements.
NOTE: Please ensure you can run Visio 2010 either via Citrix or by an installation on your computer. Note that Citrix only supports Visio 2010. Visio is downloadable through the Student Software Store under Course Home in our Shell. If you have Visio 2013, you can use that at well too. There are two tutorials to consult with dependent on which version of Visio you will be using, either DBP-e13-Appendix-F.pdf or kroenke_dbp12e_appendix_f.pdf. Both are housed in the in the folder titled Visio Instructions Documents in Doc-Sharing. Access Visio 2010 at https://lab.devry.edu. If you cannot connect to Citrix, please consult with the Help Desk as specified within the iLab page under Course Home. Note, that the Steps listed below are specific to Visio 2010.
Listen
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read these step-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
Name your Visio file using Lab2_, your first initial, and your last name (e.g., Lab2_JSmith.vsd). Create and save your database model in your Visio file. When you are done, submit your database to the Week 3: iLab Course Dropbox.
Create and save your database model in your Visio file. Submit your file to the Week 3: iLab Course Dropbox.
Listen
Required Software
Visio 2010
(Visio 2010 is required for this project. Please ensure that you can run Visio 2010 via Citrix or by having it installed on your computer.)
Access the software at https://lab.devry.edu.
Steps: 1-8
Listen
Lab Steps
Listen
STEP 1: Business Case
Read the following business requirements closely to determine the entities and relationships needed to fulfill the requirements. The nouns in the paragraph will tell you the entities that will be needed. The verbs in the paragraph will help you determine the relationships between the entities.
Muscles Health Club Database Requirements
The Muscles Health Club needs a database to keep track of its members, their personal trainers, and the fitness classes that they are taking.
Employees can act as personal trainers for members. However, only certified employees can act as personal trainers. A member can work with only one personal trainer at a time.
Members can take multiple fitness classes. Fitness classes are taught by employees who can teach multiple classes. Fitness classes are taught in one of the classrooms at one of Muscles Health Club’s several locations.
Each fitness classroom is designed for a different type of class (e.g., spinning, aerobics, water aerobics, weight training, etc.). It is necessary to track what fitness classes are being held in each of the different Muscles Health Club locations.
Listen
STEP 2: Using Visio
Run Visio 2010 either via Citrix or on your workstation.
Click on the Software and Database Template group in the main window.
Double-click on the Database Model Diagram Template to open a new file.
Save the file with a name containing Lab2_, your first initial, and your last name as the file name (e.g., Lab2_JSmith.vsd). You will need to click the Computer icon in the Save As window to see the different drives. Be sure to save the file to a local drive so it will be on your workstation.
Listen
STEP 3: Determine Database Entities
Add an entity for each entity that you identified in the requirements.
Drag the Entity icon onto the drawing area in Visio.
In the Database Properties window, add a physical name to identify it.
Listen
STEP 4: Entity Attributes
For each entity, create a list of attributes that you think would be useful to describe the entity.
Select an entity in the drawing area of Visio.
In the Database Properties window, select the Columns category.
Use the table to add your attributes to the selected entities.
Select one of the attributes to be the primary key (PK).
Listen
STEP 5: Crow’s Feet Notation
Set the diagram to use crow’s feet notation.
On the Database tab, in the Manage group, click Display Options.
In the Database Document Option dialog, select the Relationship tab.
Select the Crow’s Feet check box, and then click OK.
Listen
STEP 6: Entity Relationships
Draw relationships between your entities.
Drag the Relationship icon onto a blank part of the drawing area.
Connect the two ends to each of the two entities in the relationship. The parent entity must have a PK defined. The entity will be outlined in bold red lines when it connects to one end of the relationship.
Listen
STEP 7: Relationship Cardinality
Set the cardinality of your relationships.
Select a relationship line in the drawing area that is connecting two entities.
In the Database Properties window, select the Miscellaneous category.
Select the cardinality for the selected relationship.
Listen
STEP 8: Save and Upload to Dropbox
When you are done, save the file on your local hard drive and upload it to the Week 3 Course Dropbox. Your file should have the following filename format: Lab2_FirstInitialLastName.vsd.
Listen
Rubric
Points will be awarded according to the following rubrics.
10 Points: Visio drawing: E-R model is provided as a Visio diagram.
10 Points: Entities: A minimum of four entities is present.
10 Points: Attributes: There are more than two attributes per entity; in most cases, there should be several.
10 Points: Relationships: A minimum of three relationships is present.
10 Points: Cardinality is specified on each relationship with crow’s foot notation.
Week 5 I-Lab
iLab 3 of 4: Database Construction Using MySQL (100 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.
Using the documentation listed at the bottom of this tutorial, please ensure that you can connect to MySQL/Omnymbus via the account your Professor has e-mailed to you, that you can properly name a database, and that you can run an sql script under that database. Please consult with the document titled MySQLOmnymbusSupport.docx located in the Doc Sharing folder titled Omnymbus Tutorial Files for instructions on how to get help for any issues that you are having with the MySQL/Omnymbus Environment.
Deliverables
SQL script file named LastName_Lab3.sql. Word document named LastName_Lab3_Output. When you are done, zip up these files and submit them to the Week 5: iLab Dropbox.
Required Software
Omnymbus – MySQL
Access the software at https://devry.edupe.net:8300.
Steps 1–8
iLAB STEPS
STEP 1: Entity Relationship Diagram Analysis
Back to Top
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
• Just like you did in the Week 1 iLab, create a new database following the naming conventions we are to use 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: Open MySQL via Omnymbus, Create SQL File, Drop Table
Back to Top
• 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_Lab3.sql containing SQL statements created in Steps 3–7 below.
• But first include the following commands at the top of your script:
o SET FOREIGN_KEY_CHECKS=0;
o DROP TABLE IF EXISTS STUDENT;
o DROP TABLE IF EXISTS CAMPUS;
o DROP TABLE IF EXISTS ROOM;
o DROP TABLE IF EXISTS COURSE;
o DROP TABLE IF EXISTS INSTRUCTOR;
o DROP TABLE IF EXISTS APPROVED_INSTRUCTOR;
o DROP TABLE IF EXISTS CLASS;
o DROP TABLE IF EXISTS STUDENT_GRADE;
o SET FOREIGN_KEY_CHECKS=1;
STEP 3: Add Tables, Set Primary Keys and Foreign Keys
Back to Top
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
Back to Top
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
Back to Top
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
Back to Top
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
Back to Top
• 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
Back to Top
When you are done, zip up the following files to the Week 5: iLab Dropbox:
• LastName_Lab3.sql script file.
• LastName_Lab3_Output Word document.
Rubric
Back to Top
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
o Dates should have a date data type.
o Surrogate keys should be autonumbered.
o Numeric data should have a numeric data type.
o Character data should have a character data type.
• 10 Points: Relationships created as shown on the provided E-R model
o Relationships enabled for referential integrity
o 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
o Student name cannot be set to null.
o Course credit hours are restricted to between one and four.
o Course name must be unique and cannot be set to null.
o Instructor last name and first name cannot be set to null.
o Grade is restricted to be one of these values: A, B, C, D, F, I, W, or E (enrolled).
Week 7 I-lab
Scenario/Summary
In this assignment, you will learn to create and manipulate a MySQL database using the PHP. To complete this assignment, you will need to be able to run MySQL via Omnymbus. You should review Chapter 11’s coverage on PHP, the tutorial titled “PHP and MySQL” listed in the Webliography and MySQL’s own dialect of the SQL language via the file M10C_KROE8352_13_SE_WC10C.pdf in the Doc-Sharing folder titled My SQL Documents.
Please ensure that you can connect to MySQL/Omnymbus via the account your Professor has emailed to you. Please consult with the document titled MySQLOmnymbusSupport.docx ?located in the Doc-Sharing folder titled Omnymbus Tutorial Files for instructions on how to get help for any issues that you are having with the MySQL/Omnymbus Environment.
Listen
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read these step-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
Name your MySQL database Lab4_xxxx where xxxx is your userid. Create and save your MySQL database file. You will be required to submit a web-link to your index.php file, along with 6 php script files and a sql file that will be executed from the Omnymbus public Web page from your Omnymbus account. Please note that your php and sql files will be based upon the templates provided the zip file titled MIS582_Wk7_templates.zip located in the folder titled iLab Documents in Doc Sharing.
You will need to modify the following php scripts and sql file from the MIS582_Wk7_templates.zip file.
index.php
insert.php
insert_data.php
update.php
update_data.php
delete.php
MyAddressBook_CreateTable.sql
When you are done, submit your index.php link and zip file to the Week 7 Course Dropbox.
Listen
Required Software
Omnymbus – MySQL
Access the software at https://devry.edupe.net:8300.
Steps 1-7
Listen
Lab Steps
Listen
STEP 1: Review the Data Dictionary
Review the provided data dictionary below to understand the entity, attributes, and primary key that you will create in your MySQL database.
Table Name
ATTRIBUTE NAME
CONTENTS
TYPE
FORMAT
RANGE
REQUIRED
PK or FK
MyAddressbook
id
Contact ID Number
Auto-Increment
Int(3)
999
000-999
Y
PK
f_name
Contact First Name
VCHAR(25)
Xxxxxx
Y
L_name
Contact Last Name
VCHAR(25)
Xxxxxx
Y
ADDRESS
Contact Address
VCHAR(25)
Xxxxxx
Y
City
Contact City
VCHAR(25)
Xxxxxx
0-9
Y
State
Contact State
CHAR(2)
Xxxxxx
Y
zip
Contact Zip Code
NUMBER(5)
99999
Y
phone
Contact Phone
NUMBER(10)
9999999999
Y
Listen
STEP 2: Create Table, Insert Statement
Run MySQL via Omnymbus.
Modify the table creation script that will be used to create the database with the outlined attributes from the Data Dictionary.
Provide one Insert Statement that will add your contact information to the newly created table.
Save the file with a name containing Lab7_, your first initial, and your last name (e.g., Lab7_JSmith.sql).
Execute your script and ensure that the database is created.
Listen
STEP 3: Build Index PHP Page
Building Your index.php Web Page
In this step, you will complete your php script page to connect to the Lab7 database and display the MyAddressbook table on the Web page.
Complete the MySQL connection for the index.php page. Be sure to fill in appropriate host (127.0.0.1), username, password, and database information in the mysqli field.
Modify the provided php code to display each attribute of your MyAddressbook table. Note that initially, only 1 entry should be present in your table.
Save your index.php file in your public_html folder in Omnymbus file manager.
Please note that you will find your public_html folder down the path zdisk/USERID/public html
Direct your Web browser to your site url (ex. http://devry.edupe.net/~XXXX/index.php).
Note that you’ll replace XXXX with your Omnymbus login ID.
Ensure that your file executes and the database table displays on the screen.
If you have a correct connect command but you get the error message “MySQL ERROR 1045 (28000): Access denied for user” you will have to create a new password with the box “Change password in other modules?” checked.
The following image provides an example of how your index.php page should look with no entries provided in the database. Note: Feel free to add any additional formatting or images to your index.php page.
Listen
STEP 5: Build Update PHP Pages
Building Your update.php and update_data.php Pages
In this step, you will complete two php HTML pages. Your update.php page will provide a form for users to submit data to the database that will be updated. The update_data.php page will provide the actual queries in php to update the data in your database. When this process is complete, your page will redirect the user back to the index.php page.
Review the update_data.php page template.
You will need to modify the php code to add additional input forms for the user to enter all appropriate attributes that will need to be updated.
In the update_data.php file, ensure that your <form action> tag is set equal to update.php
Character data should have a character data type.
When the action is complete, your page should redirect back to index.php.
Listen
STEP 6: Build Delete PHP Page
Building Your delete.php Page
In this step, you will complete the delete.php page. Your delete.php page will process the query that will remove the necessary data for the database. When this process is complete, your page will redirect the user back to the index.php page.
Review the delete.php page template.
You will need to modify the php code to delete the provided entry based on the address id.
When the action is complete, your page should redirect back to index.php.
Listen
STEP 7: Test Links to Update, Delete, and Insert Pages. Submit Deliverables.
Finishing Your Web-Enabled Database
Before submitting, ensure that you have added at least 5 entries to your Addressbook database.
Ensure that all links for update, delete, and insert work properly.
When you are done, submit your web-link to your index.php (e.g. http://devry.edupe.net/~####/index.php), along with the zip file titled Lab4_FirstInitialLastName.zip which should contain your six php code pages and your database script.
Listen
Rubric
Points will be awarded according to the following rubrics.
10 points: Script and Table created for the MyAddressbook entity as described in the Data Dictionary.
10 points: index.php created that correctly displays the contents of the database.
10 points: insert.php and insert_data.php pages created that correctly add data to the database.
10 points: update.php and update_data.php pages created that correctly update the data in the database.
10 Points: delete.php page created that correctly removes an entry from the database.
For a more advanced optional lab experience you can add error checking and comments and better appearance to the code. Use Chapter 11 as a guide.
