Thursday 7 January 2016

Hierarchical Data Model

Hierarchical Data Model:


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


No comments:

Post a Comment