Hierarchical Data Model:
- A hierarchical database model is a data model in which the data is organized into a tree-like structure.
- The data is stored as records which are connected to one another through links.
- A record is a collection of fields, with each field containing only one value.
- Parent-Child Relationship Type is basically 1:N relationship
- The schema for a hierarchy has a single root
- To represent M:N relationship in a hierarchical structure, we must allow duplication of child record instances.
Example For Hierarchical Data Model |
Advantages:
- The model allows easy addition and deletion of new information.
- Data at the top of the Hierarchy is very fast to access.
- The model relates very well to natural hierarchies such as assembly plants and employee organization in corporations.
- It relates well to anything that works through a one to many relationship.
Disadvantages:
- It requires data to be repetitively stored in many different entities.
- The database can be very slow when searching for information on the lower entities.
- Searching for data requires the DBMS to run through the entire model from top to bottom until the required information is found, making queries very slow.
- Can only model one to many relationships, many to many relationships are not supported.
No comments:
Post a Comment