Module 3

advertisement
SD2520
Introduction to Database and XML with jQuery
Unit 3
1
SD2520
Introduction to Database and XML with jQuery
Unit 3
QUIZ 1 (1.0 HOUR)
Assessment Preparation Checklist:
To prepare for the quiz, revisit the assigned readings for Modules 1 and 2 from your textbook,
Introduction to Database and XML with jQuery. In addition, review and attempt the practice
questions given in the topic “Preparation” in the lessons for Modules 1 and 2.
Title: Quiz 1
Take the quiz based on the concepts covered in Modules 1 and 2.
LAB 3.1 (3.0 HOURS)
Assessment Preparation Checklist:
To prepare for this assessment:
 Go through Chapter 4, pp. 60–76 of the textbook, Introduction to Database and XML
with jQuery. This chapter examines how an entity relationship diagram (ERD) is created
by defining database entities, their attributes, and the relationships among them.
 Go through this module’s lesson, which describes the process of creating an ERD.
Title: Creating an ERD
In this lab, you will use Microsoft Visio to complete an existing entity relationship diagram (ERD)
for the given scenario.
Scenario: A Westlake Research Hospital is conducting a double blind test of a new depression
drug. The hospital needs a database that will track patients’ information, from their first
screening through each of their interviews. It is imperative that the database be ready before
the actual clinical trials begin. The staff at Westlake is anxious to see some results. It is time you
show them the logical design of their database.
Required Setup and Resources:
 Windows XP (or later)
 Microsoft Visio 2003 (or later)
 Lab3_1starter.vsd
Recommended Procedure:
1. If you are working on this lab outside the campus, then you need to download Microsoft
Visio 2010 from the DreamSpark Web site.
2. Launch Microsoft Visio on your lab computer. Note that Visio is installed on the host
operating system, not on your virtual machine.
3. Open Lab3_1starter.vsd. This file shows a partial database design for the Westlake
Research Hospital scenario.
4. Save Lab3_1starter.vsd as nnLab3_1solution.vsd, where nn are your initials.
5. Set the DoctorKey attribute to be the primary key of the Doctors entity. Next, perform
the following steps:
a. Select the Doctors entity. The entity’s properties are shown below:
2
SD2520
Introduction to Database and XML with jQuery
Unit 3
LAB
b. Click the Primary ID category.
c. Select DoctorKey and click Add. The Doctors entity should look like this:
8. Create a one-to-many relationship between the Patients entity and the Doctors entity.
Remember, each patient has one doctor, but a doctor can see multiple patients. Next,
perform the following steps:
a. Select the Patients entity.
b. Click the Columns category.
c. Add DoctorKey as a column.
d.
Drag a Relation object from the Entity Relationship pane to the
form and connect it to the entities as shown below:
0220_
3
SD2520
Introduction to Database and XML with jQuery
Unit 3
Notice that the DoctorKey attribute in the Patients entity is not designated as a foreign key.
9. Change the relationship arrow to display using the Crows Feet notation.
a. Click the Database menu. Point to Options and select Document.
b. Click the Relationship tab.
c. Check Crow’s Feet (refer to the following image).
d. Click OK.
10. Define a one-to-one relationship between the Patients entity and the
PatientInitialMedicalHistory entity. The PatientKey attribute should also be the primary
key of the PatientInitialMedicalHistory entity.
11. Review the Initial Medical History Form given below. Notice that medicines are listed at
two places. You want the application to be able to provide a list of medicine names that
the person entering data can select from. Each entity that stores a medicine name
should do so using a key.
4
SD2520
Introduction to Database and XML with jQuery
Unit 3
Next, perform the following steps:
5
SD2520
Introduction to Database and XML with jQuery


Unit 3
Modify the current database design so that a medication is only listed in a single
entity and then referenced in other tables by a key.
Add a PatientMedicationAllergies entity and define the necessary relationships.
Hint: PatientMedicationAllergies is a linking entity.
12. Save your changes and submit your .vsd file to the instructor.
Submission Requirements:
 Submit the Visio file titled “nnLab3_1solution.vsd” to your instructor for grading.
 To zip your file using the default compression utility, right-click the file, bring your
mouse cursor over Send To, and click Compressed (zipped) File. Submit the zipped file to
your instructor.
Evaluation Criteria:
The lab rubric will be used to evaluate this assessment. In addition, your submission will be
evaluated against the following points:
 Did you successfully identify the relationships in the database design?
 Did you create a lookup entity for medications?
 Did you create a linking entity that will track patient allergies?
ANALYSIS 3.1 (3.0 HOURS)
Assessment Preparation Checklist:
To prepare for this assessment:
 Go through Chapters 2, pp. 20–35 and 4, pp. 60–76 in the textbook, Introduction to
Database and XML with jQuery. These chapters how to review documents to discover
relevant entities and attributes for a database.
 Go through this module’s lesson, which explains the techniques used to document
entities and attributes for a database.
Title: Defining Entities and Relationships
From the ITT Tech Virtual Library and the Internet, search for information on the following four
types of entity roles:
 Domain: Entity describing a core business element of the database.
 Linking: Entity used to resolve a many-to-many relationship into two one-to-many
relationships.
 Lookup: Entity used to store lookup values and help ensure data integrity and
consistency.
 Weak (master/detail): An entity that depends on another entity for its meaning.
Next, analyze the four types of entity roles and compare them based on how they would be
used in an e-commerce database. Give an example of how each of these roles can be used.
Make sure that you cite the sources in APA format.
Submission Requirements:
6
SD2520
Introduction to Database and XML with jQuery
Unit 3
Submit a Microsoft Word document with following specifications:
 Font: Arial; font size: 12; double-spaced
 Length: 1–2 pages
 Citation Style: APA
Evaluation Criteria:
The analysis rubric will be used to evaluate this assessment. In addition, your submission will be
evaluated against the following points:
 Did you provide an example of each type of entity?
 Did you cite your sources using APA format?
ANALYSIS 3.2 (3.0 HOURS)
Assessment Preparation Checklist:
To prepare for this assessment:
 Go through Chapters 2, pp. 20–35 and 3, pp. 44–58 in the textbook, Introduction to
Database and XML with jQuery. This chapter reviews the tools and techniques used to
develop business requirements and rules for a database.
 Go through this module’s lesson, which explains how to review a current database to
identify issues and document the requirements for the new database design.
Title: Database Requirements and Business Rules
Read the following scenario on Wild Wood Apartments:
Wild Wood Apartments owns 20 different apartment complexes in Washington, Oregon,
California, and Idaho. Each apartment complex contains anywhere from 10 to 60 separate
apartments of varying sizes. All apartments are leased with a six-month or one-year lease.
It is the company’s practice to hire one of the tenants to manage each apartment complex. As
managers, they need to admit new tenants to the building, collect rent from existing tenants,
and close out leases. The manager also needs to maintain the apartments and conduct any
repairs, replacements, or renovations. These can be billed back to the parent company. For
acting as manager, the tenant gets free rent and a stipend. The stipend varies depending on the
size of the apartment building.
Each manager is expected to send a report to the Wild Wood Apartments company
headquarters in San Francisco every quarter. This report summarizes the occupancy rate, the
total revenues in rent, the total expenses in maintenance and repairs, and so on. Currently
managers fill out a paper form and mail it back to headquarters. Many apartment managers
have complained that preparing this report is a very difficult and time-consuming process. In
addition, the managers at the corporate headquarters have expressed concern about the
accuracy and verifiability of the reports.
7
SD2520
Introduction to Database and XML with jQuery
Unit 3
To allay these concerns and to improve the ease and efficiency with which the apartment
managers conduct their daily business, the company is proposing the development of a
centralized database that the managers can use to track the daily business of their apartment
building and to prepare their reports.
As a follow-up on your initial interview with the project coordinator, Wild Wood Apartments
has agreed to show you some samples of the various forms and reports they use.
Lease Form: Tracks leases of one apartment complex
Apt #
LeaseNumber
201
#201050109
110
306
102
#110060109
#306060109
#102060109
209
#209060109
Lessee Name
Charles
Summers
Marilyn
Newton
Janice Lewis
Larry Thomas
Mark
Patterson
StartDate
EndDate
5/1/2009
5/1/2010
12/1/200
9
6/1/2010
6/1/2010
12/1/200
9
6/1/2009
6/1/2009
6/1/2009
6/1/2009
Rent
Amount
Deposit
Current
$1,500.00
$3,500.00
1
$1,200.00
$1,250.00
$1,250.00
$2,900.00
$3,000.00
$3,000.00
1
1
1
$1,450.00
$3,400.00
1
Rent Payment Form: Tracks rent payment of one apartment complex
Date
Name
Apartment Lease Number Amount Paid
Late
7/1/2009 Martin Scheller
203
#203011208
$1,200.00
7/1/2009 Roberta Louise
311
#311060108
$1,400.00
7/1/2009 Sue Tam
111
$1,400.00
7/1/2009 Laura Henderson
207
#207020209
$1,350.00
7/1/2009 Thomas Jones
110
#110010109
$1,200.00
7/2/2009 Shannon Hall
205
#205010109
$1,350.00
7/2/2009 Bob Newton
104
#104030209
$1,250.00
7/9/2009 Dennis Smith
209
$1,400.00
X
Maintenance Request Form: Tracks requests for maintenance and the apartment manager’s
resolution
Apt Date
303 7/5/2009
201 7/5/2009
Problem
Type
Left burner
out on range
electrical
Water damage
from
overflowing
bathtub
floor
Resolution
Res Date
BExpense Texpense
Electrician
rewired
7/10/2009
$150.00
$
Replaced
flooring
new tile
7/21/2009
$200.00
$350.00
-
8
SD2520
Introduction to Database and XML with jQuery
Apt Date
Problem
101 7/6/2009
Dishwasher
backing up
207 7/15/2009 Hole in plaster
Refrigerator
113 7/15/2009 failed
Type
Resolution
Filter
clogged
plumbing cleared it
Patched
walls
hole
utilities
Unit 3
Res Date
BExpense Texpense
7/6/2009
$35.00
7/17/2008
$
New
refrigerator 7/20/2009
$
-
$690.00
-
$250.00
$
-
Sample Quarterly Report, which each manager must turn in to the main office
Quarterly Report
Building#
Address
Quarter
Total Apartments
45
Revenues
Total Rent Revenue
Expenses
Utilities
Maintenance
Repairs
Insurance
New Tenant Cleaning
Wages
Total Expenses
#12
1321 East Lake, Seattle, WA 98123
Spring
Year
2010
Currently Occupied
Percent No. Changing Tenants
40
89%
13
175,500.00
2,450.00
11,298.00
9,790.00
5,340.00
10,400.00
19,200.00
58,478.00
Unrecovered Rents
3,200.00
Total Profit/Loss
113,822.00
Based on your review of the scenario, perform the following tasks:
1. Identify the stakeholders for Wild Wood Apartments.
2. Make a list of the database requirements for each stakeholder involved in the database.
3. Make a list of business rules for Wild Wood Apartments.
4. Prepare a Microsoft PowerPoint presentation that you will present to the Wild Wood
management. This presentation should include all the stakeholders, database
requirements, and business rules for Wild Wood Apartments.
9
SD2520
Introduction to Database and XML with jQuery
Unit 3
Submission Requirements:
Submit your PowerPoint presentation for grading. Create a professional background for your
slides. Your PowerPoint should include the following slides:
 Title slide
 Introduction slide
 One slide for listing stakeholders
 One-two slides for database requirements
 One-two slides for business rules
 Summary slide
PROJECT PART 1 (6.0 HOURS)
Assessment Preparation Checklist:
To prepare for Project Part 1, revisit the assigned readings for Modules 1 through 3 from
your textbook, Introduction to Database and XML with jQuery. In addition, review the
Module 3 lesson that presents important points that you need to consider before
submitting Project Part 1.
Title: Database Requirements for Grandfield College
Submit Project Part 1 for evaluation to your instructor. Refer to the “Project: Building
Grandfield College Website” section of the study guide for a detailed description of the
project.
10
Download