CIS4365: Database Applications Fall, 2017 |
Hierarchical DBMS The hierarchical DBMS is based on the logic that we tend to view things as hierarchies. Consider how you have your files stored on your hard disk (I'm assuming):
Notice that a directory may have may subdirectories, but a subdirectory can only belong to one parent directory. This is a 1:M (one to many) relationship, and is one of the most (perhaps the most) common type of relationship. As we will see later, there are other types of relationships: 1:1 (One-to-one: e.g., you and your Social Security Number: You can have only one social security number, and a social security can only be associated with one person), and M:M (Many-to-many; A class can have many students, and each student may take many classes). Now, let's consider your family tree, but viewed ONLY with respect to your grandmother and her offspring (Let's assume that it is your father).
!!! Wait a Minute !!! No, thanks. I used this example, because we will discuss some problems with the hierarchical approach later using the same example. Let's take a look at one final example, which is much more appropriate using the hierarchical model.
In this case, we know that a University has many Colleges. Each College has many Departments. Each Department offers many Courses. This is a good example of a hierarchical database. Each parent (e.g., University) can have many children (e.g., College of Engineering, College of Business, College of Arts and Sciences), each of whom can can have many other children (e.g., the College of Business has the Finance, Accounting, Information Systems, and Management Departments). The relationships can continue until there is no where else to go (i.e., there comes a time when there are no children). There are
some basic rules here:
Because this is a 'Tree-like' structure, we also tend to use
some 'tree-like' terminology:
In the above illustration, we have also included such terminology as Level X children and Level Y segment. The terms are actually self explanatory, but if it doesn't make sense to you, well that is not the intent of this particular course. The Hierarchical model of DBMS has many advantages, but also some disadvantages (life is a trade-off):
This page was last updated on 08/23/03.
|