Database Reference
In-Depth Information
organization reside in a database. Therefore, when designing a database, you first
create a data model. The model would represent the real-world data requirements.
It would show the arrangement of the data structures.
Database software has evolved to support different types of data models. As we
try to represent real-world data requirements as close as possible in a data model,
we come up with a replica of the real-world information requirements. It turns out
that we can look at data requirements and create data models in a few different
ways. At this stage, let us survey a few leading data models. Over time, different
vendors have developed commercial database management systems to support each
of these common data models.
Hierarchical
Let us examine the data requirements for a typical manufacturing company.
Typically in manufacturing, you have major assemblies, with each major assembly
consisting of subassemblies, each subassembly consisting of parts, each part
consisting of subparts, and so on. In your database for the manufacturing company,
you need to keep data for the assemblies, subassemblies, parts, and subparts.
And the data model for manufacturing operations must represent these data
requirements.
Think about this data model. This model should show that an assembly contains
subassemblies, a subassembly contains parts, and a part contains subparts. Immedi-
ately you can observe that this data model must be hierarchical in nature, dia-
gramming the assembly at the top with subassembly, part, and subpart at successive
lower levels.
In the business world, many data structures are hierarchical in nature. You can
notice a hierarchy in department, product category, product subcategory, product
line, and product. You can trace a hierarchy in division, subdivision, department,
and employee. Figure 1-8 illustrates one such model showing the hierarchy of cus-
tomer, order, and order line item. A customer may have one or more orders, and
an order may have one or more line items, perhaps one line item for each product
ordered.
Let us review the key features of the hierarchical model by referring to
Figure 1-8.
Levels. Each data structure representing a business object is at one of the hierar-
chical levels.
Parent-Child Relationships. The relationship between each pair of data structures
at levels next to each other is a parent-child relationship. CUSTOMER is a parent
data segment whose child is the ORDER data segment. In this arrangement, a child
segment can have only one parent segment but one parent segment may have mul-
tiple child segments. You may want to separate orders into phone orders and mail
orders. In that case, CUSTOMER may have PHONE ORDER and MAIL ORDER
as two child segments.
Root Segment. The data segment at the top level of the hierarchy is known as the
root data segment (as in an inverted tree).
Search WWH ::




Custom Search