2 Feb 2020

  • February 02, 2020
  • Amitraj
Tree-Structure Diagram


A tree-structure diagram is the schema for a hierarchical database. Such a diagram consists of two basic components:-

1. Boxes, which correspond to record types

2. Lines, which correspond to links


-> A tree-structure diagram serves the same purpose as an entity–relationship (E-R) diagram; namely, it specifies the overall logical structure of the database. A treestructure diagram is similar to a data-structure diagram in the network model.

-> The main difference is that, in the latter, record types are organized in the form of an arbitrary graph, whereas in the former, record types are organized in the form of a rooted tree.


-> We have to be more precise about what a rooted tree is. First, there can be no cycles in the underlying graph. Second, there is a record type that is designated as the root of the tree. The relationships formed in the tree-structure diagram must
be such that only one-to-many or one-to-one relationships exist between a parent and a child. The general form of a tree-structure diagram appears in below Figure.



Figure:  General structure of a tree structure diagram



-> Note that the arrows are pointing from children to parents. A parent may have an arrow pointing to a child, but a child must have an arrow pointing to its parent.

-> The database schema is represented as a collection of tree-structure diagrams.

-> For each such diagram, there exists one single instance of a database tree. The root of this tree is a dummy node. The children of the dummy node are instances of the root record type in the tree-structure diagram. Each record instance may, in turn,
have several children, which are instances of various record types, as specified in the corresponding tree-structure diagram.



There are many types of Relationships in tree structure diagram:-

1. Single Relationships
2. Many to Many Relationships
3. General Relationships
4. Several Relationships


Translate

Popular Posts