Week 1: The Database User View – iLab
iLab 1: SQL Queries Using Access
NOTE: Access 2010 is required for this project. Please ensure you can run Access
i L A B O V E R V I E W
Scenario and Summary
This week, you will learn to create and run SQL SELECT queries in the Access database. You will need to
download the Lab_1_SQL.accdb database from Doc Sharing and be able to run Access 2010, either through Citrix or installed on your workstation or laptop.
Deliverables
Rename the Lab_1_SQL.accdb database using your first initial, last name, and assignment number as the file name (e.g., JSmith1.accdb). Create and save your SQL queries in your database. When you are done, submit
i L A B S T E P S
STEP 1
• Download the Lab_1_SQL.accdb database from Doc Sharing.
• Rename the Lab_1_SQL.accdb database with the following naming convention: Lab1_FirstinitialLastname as the file name (e.g., Lab1_JSmith.accdb).
STEP 2
Using the data in the Student table in the database, create a SQL query to satisfy each of the tasks below.
Save each SQL query using the name associated with the task in the table below.
Name Task
Query1 Write a SQL statement to display Students’ 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 88888.
Query4
Write a SQL statement to display the First and Last Name of students who live
in the Zip code 88888 and have the major of Biology.
Query5
Write a SQL statement to display the First and Last Name of students who live
in the Zip code 88888 or 88808. Do not use IN.
Query6
Write a SQL statement to display the First and Last Name of students who
have the major of Biology or Math. Use the SQL command IN.
Query7
Write a SQL statement to display the First and Last Name of students who
have the Status 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 in their first names.
Query10
Write a SQL expression to display the Status and a sum of the Status of each
Status value as SumOfStatus. Group by Status and display the results in
descending order of SumOfStatus.
STEP 3
Upload the following files to the Week 1: Course Project Dropbox.
Lab1_FirstInitialLastName.accdb
Submit your assignment to the Dropbox located on the silver tab at the top
of this page.
(See Syllabus “Due Dates for Assignments & Exams” for due dates.)
Rubrics
Queries that are correct will be awarded the number of points shown below:
6 points: Query 1
7 points: Query 2 – Query 5
8 points: Query 6 – Query 9
9 points: Query 10
The following rubrics will be used for incorrect queries:
0 points: Query was not turned in with the assignment.
-5 points: Query would not run.
-4 points: Query runs but is incorrect because query required a Where clause to meet requirements which was not included.
-3 points: Query runs but is incorrect because Where clause contained errors, gives popup for user input, or only meets partial requirements.
iLab 2 : Data Modeling Using Visio (100 Points)
(See Syllabus “Due Dates for Assignments & Exams” for due dates.)
NOTE: Visio 2010 is required for this project. Please ensure you can run Visio 2010 via Citrix or by having it installed on your computer.
i L A B O V E R V I E W
Scenario and Summary
In this assignment, you will learn to create a physical database model in Visio from business requirements. To complete this assignment, you will need to be able to run Visio 2010, either through Citrix or installed on your workstation or laptop.
Deliverables
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.
i L A B S T E P S
STEP 1
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 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.
STEP 2
# 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.accdb). 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.
STEP 3
Add an entity for each entity 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.
STEP 4
For each entity, create a list of attributes 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).
STEP 5
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.
STEP 6
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.
STEP 7
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.
STEP 8
When you are done, save the file on your local hard drive and upload it to the Course Project Drop box. Your file should have the following filename format: Lab2_FirstInitialLastName.vsd.
Submit your assignment to the Drop box located on the silver tab at the top of this page.
(See Syllabus “Due Dates for Assignments & Exams” for due dates.)
Grading Rubrics
Each query is worth 10 points. Points for each query will be awarded according to the following rubrics.
# 20 Points: Visio drawing: E-R model is provided as a Visio diagram.
# 20 Points: Entities: A minimum of four entities is present
# 20 Points: Attributes: There are more than two attributes per entity; in most cases there should be several.
# 20 Points: Relationships: A minimum of three relationships is present.
# 20 Points: Cardinality is specified on each relationship with crow’s foot notation.
iLab 3 : Database Construction Using Access (100 Points)
i L A B O V E R V I E W
Scenario and Summary
In this assignment, you will learn to create an Access database from a given ERD. To complete this assignment, you will need to be able to run Access 2010, either through Citrix or installed on your workstation or laptop.
Deliverables
Name your Access database file using Lab3_, your first initial, and your last name (e.g., Lab3_JSmith.accdb). Create and save your Access database file. When you are done, submit your database to the Course Project Dropbox.
i L A B S T E P S
STEP 1
Review the ERD below to understand the entities, attributes, primary keys, and relationships that you will create in your Access database.
ERD iLab Image
STEP 2
# Run Access 2010, either via Citrix or from Visio 2010 installed on your workstation.
# Select the blank database icon in the main window.
# Save the file with a name containing Lab3_, your first initial, and your last name (e.g., Lab3_JSmith.accdb). In Citrix, 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.
See the tutorials above for instructions on how to perform the following steps in Access 2010.
STEP 3
Add tables to the Access 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 a primary key for each table as indicated in the provided ERD diagram.
STEP 4
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 autonumbered.
# Numeric data should have a numeric data type.
# Character data should have a character data type.
STEP 5
Draw relationships between your entities.
* Selection Relationships under Database Tools. Move all your tables into the Relationship window by dragging them in or by using the Show Tables pop-up window.
* Second item
o Add the relationship between the tables in your database.
o Enable referential integrity on the relationship.
o Enable cascade updates on the relationship.
STEP 6
Add at least two rows of data to each table in your database. Use any values 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
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 8
When you are done, save the file on your local hard drive and upload it to the Course Project Dropbox. Your file should have the following filename format: Lab3_FirstInitialLastName.accdb.
For instructions on how to copy files between the Citrix server and your local machine, watch the iLab tutorial, Copying Files from Citrix, located in the iLab menu tab under Course Home.
Note!
Submit your assignment to the Dropbox located on the silver tab at the top of this page.
Rubrics
Each query is worth 10 points. Points for each query will be awarded according to the following rubrics.
* 10 points: Assignment delivered as an Access database
* 20 points: Table created for each entity in the provided E-R model
* 10 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
* 10 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.
* 20 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 two rows of data added for each table
* 15 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).
This assignment is subject to the late policy outlined in the Syllabus.
IS582 Week 4 Lab – Well formatted 5 Report and 3 forms – More than 2 rows uunder each parent row -Completely as per the specification – Screenshot Attached – Guaranteed A+
iLab 4 : Forms and Reports (75 Points)
i L A B O V E R V I E W
Scenario and Summary
In this assignment, you will learn to create and save forms and reports in a provided Access database. To complete this assignment, you will need to be able to run Access 2010.
Deliverables
Name your Access database file using Lab4_, your first initial, and your last name (e.g., Lab4_JSmith.accdb). Create and save your Access database file. When you are done, submit your database to the Course Project Dropbox.
i L A B S T E P S
STEP 1
* Download the Lab4_FormsReports.accdb database from Doc Sharing.
* Rename the Lab4_FormsReports.accdb database with a name containing Lab4_, your first initial, and your last name as the file name (e.g., Lab4_JSmith.accdb).
STEP 2
# Run Access 2010, either via Citrix or from Visio 2010 installed on your workstation.
# Open the database you renamed in Step 1.
STEP 3
Reports
Create a report for each of the following requirements. Reports may be created using the wizard or an SQL query. Reports should follow the formatting guidelines given in the next step. Reports should be named as indicated below (e.g., Report1, Report2, etc.).
1. Report1: Show Instructor information (Instructor_ID, First_Name, Last_Name) grouped by Approved Course_No.
2. Report2: Show student information (Student_ID, First_Name, Last_Name, Status, Zip) grouped by Major.
3. Report3: Show student information (Student_ID, First_Name, Last_Name, Major) grouped by Zip code. Zip codes should be in increasing order.
4. Report4: Show student information (First_Name, Last_Name) grouped by Course Number and Course Name. Course Number should be in in increasing order.
5. Report5: Show student information (Student_ID, First_Name, Last_Name, Address, Zip) grouped by Status. Students should be in alphabetical order by Last_Name and;then First_Name.
STEP 4
Report Format
# Reports should display two or more child rows for each parent row. For example, Report1 should display each Course_No with instructors who are approved to teach the course grouped under it. In this case, the parent row would be the Approved Course_No with Instructor listed as child rows underneath each parent row
# There should be at least two child rows of data for each parent row. Add data to the tables in order to have reports show at least two child rows per parent.
STEP 5
Form1: Create a form based on an SQL query.
* Create and run an SQL query that displays Student Information (Student_ID, First_Name, Last_Name, Address, Zip).
* Save the query in the database named Form1Query.
* Create a form based on Form1Query. While Form1Query is selected, go to the Create menu and select Form to build the basic form.
* Select the form and switch between the views (Forms, Layout, and Design) to change the properties or the form’s appearance as desired.
* Save the form in the database named Form1Query.
STEP 6
Form2: Create a form using the Form Wizard.
* Invoke the Form Wizard as shown in the tutorials above.
* Using the Form Wizard, create a form showing instructor information (Instructor_ID, First_Name, Last_Name, Office_No).
* Switch between the views (Forms, Layout, and Design) to change the properties or the form’s appearance as desired.
* Save the form in the database named Form2Wizard.
STEP 7
Form3: Create a form using a master detail relationship. A master detail relationship is simply a 1:N relationship between two tables. Use subforms to format the form in a split data entry form as shown in Figure 1-9. You may use SQL queries or the wizard or both to create your form and subform.
# Create a master form showing student information (Student_ID, First_Name, Last_Name, Address, Zip, Major, Status).
# Create a detail Subform showing Student_ID, Class_ID, and Student_Grade.
# For each student displayed, the student’s classes and grades should be displayed in the detail form.
# Switch between the views (Forms, Layout, and Design) to change the properties or the form’s appearance.
# Save the form in the database named Form3MaterDetail.
STEP 8
When you are done, save the file on your local hard drive and upload it to the Course Project Dropbox. Your file should have the following filename format: Lab4_FirstInitialLastName.accdb.
Rubrics
The maximum number of points possible will be awarded according to the following rubrics.
* 5 points: Assignment delivered as an Access database
* 8 points: Report 1
* 8 points: Report 2
* 8 points: Report 3
* 10 points: Report 4
* 10 points: Report 5
* 8 points: Form 1
* 8 points: Form 2
* 10 points: Form 3
Points will be subtracted from each report for the following errors.
* 1 point: Report not named as specified
* 1 points: Report not formatted to display two or more child rows for each parent row as required
* 1 points: Not enough data added to show two child rows for each parent row
* 1 points: Does not implement the required sort
* – half of points possible: Does not return any data
* 0 points: Awarded to any report that is not saved in the submitted database
Points will be subtracted from each report for the following errors.
* -2 points: Forms do not show the data specified.
* -1 point: Forms not named as specified.
* -2 points: No query saved for Form 1.
* -4 points: No master detail relationship shown in Form 3.
* – half of points possible: Report does not return any data.
* 0 points: Awarded for any form not saved in the submitted database
This assignment is subject to the late policy outlined in the Syllabus.
Step 7 : figure 1-9