Information Technology Reference
In-Depth Information
Q
2WKHU
+RVSLWDO
&RXQWU\
KDV
3DWLHQW
'HSDUWPHQW
'RFWRU
&
EHORQJ
Q
0HGLFDO
)ROGHU
Q
5HFRUG
)ROGHU
P
Q
FRQWDLQ
ERUURZ
%RUURZHU
*
ORJ
Q
$(
5HFRUG
:DUG
5HFRUG
2XWSDWLHQW
5HFRUG
/RDQ
+LVWRU\
/RDQ+LVWRU\
Fig. 3.54 EER model for a hospital database system
Step 2.1—Deining an XML View
In this case study, suppose we concern the patient medical records, so the entity
Patient is selected. Then we define a meaningful name for the root element, called
Patient_Records. All patients are under the root element as shown below.
XML Schemas (DTD):
<!ELEMENT Patient_Records (Patient)+>
We start from the entity Patient in the EER model and then find the relevant entities
for it. The relevant entities include the related entities that are navigable from the
parent entity. Entities Record Folder, Medical Record, and Borrow are considered
relevant entities because they are navigable from the entity Patient. Since the rela-
tionship between the entity Patient and the entity Country is many-to-one, then the
entity County is considered not navigable from the entity Patient according to our
methodology. As a result, a DTD-graph that starts from the entity Patient is formed
and shown in Fig. 2.9 in Chap. 2.
The entity Patient is a direct child of the root element, Patient_Records. Since
the entities Record Folder and Medical Record are navigable from the Patient entity,
then we map all those entities into the elements of the XML DTD. We then define
the attributes of those elements by using the definition of the relational schema as
shown below:
Listing 1 Translated XML schema in DTD for relations Patient, Record_Folder,
and Medical_Record
Search WWH ::




Custom Search