Quick Contact

    What are Data Models?

    A model is an abstraction procedure that hides superfluous information while highlighting records pertinent to the software at hand. A data model is a technique that supports this abstraction for database functions. Data modeling is used for performing entities of interest and their relationship within the database. It permits the concept of the association between numerous entities and their attributes. Different types of Data Models are available.

    Types of Data Models

    There are different types of data model which can be as follows:

    Types of Data Models
    Hierarchical Data Model

    Hierarchical Model was the first DBMS model. This model organizes the record in the hierarchical tree structure. A tree is a data architecture that consists of an order of nodes, with an individual node, known as the root, at the largest level.

    A node might have any number of children, but each child node may additionally have only one parent node in which it is dependent. The parent-to-child relationship in a tree is, therefore, a one-to-many relationship, but the child-to-parent is one to one. The parent-child relationship is displayed using drawing a line or edge between the parent and child nodes.

    Types of Data Models

    Fig represents an instance of tree architecture. A node that has no children is called a leaf; leaves can appear on several levels. In fig, components 4, 5, 7 through 11 are leaves. Nodes that are children of a similar parent are known as siblings.

    For example, components 2, 3, 4 are siblings. For any node, there is an individual path, known as the hierarchical path from the root to that node. The nodes along this direction are known as that node’s ancestors. Equally, for a given node, any node along a direction from that node to leaf is referred to its descendent. The height of a tree is several levels in the deep hierarchical direction from the root to a leaf. The tree in the figure has a height of 4. A tree is stated to be balanced in every direction from the root node to a leaf that has a similar length.

    The figure shows a Balanced and Unbalanced Tree.
    Types of Data Models

    A binary tree is one in which each node has no longer more than two children.

    Types of Data Models

    Fig indicates a possible data mechanism diagram for a tree describe the STUDENT, FACULTY, and CLASS. In this architecture, we have preferred to make the FACULTY the root node or segment. Its fields are FID_NAME, DEPT, and RANK. We have to define CLASS as a child of FACULTY, which displays that there is a one-to-many relationship among each FACULTY record and its related CLASS records.

    Types of Data Models

    We also made the STUDENT data a segment of the tree and defined it as a child of class. We introduced GRADE to the student segment since there is no ambiguity about which program the student’s grade is for. Again, there is a one-to-many relationship between CLASS and STUDENT

    The figure suggests an instance of the FACULTY-CLASS-STUDENT tree. In an example, a child node may occur zero, one or many times, even though it happens precisely in the tree mechanism diagram.

    Types of Data Models
    There are three functions on the Hierarchical model:
    1. Deletion:

      If we need to delete the class, say CS01, then the student with STUID similar to 100 will also need to be deleted. So deletion is very difficult.

    2. Insertion:

      A new class, say CS03, can’t be brought until some faculty is possible at the root level. So insertion is also tricky.

    3. Updation:

      Suppose ROOM has changed. For this change, the search problem will appear which time is consuming.

    Hence we will say that this model has a problem in insertion, deletion, and updation.

    Advantages of Hierarchical Data Model

    Following are the advantages of hierarchical data model:

    Simplicity:

    Since the database is primarily based on hierarchical architecture, the relationship between the different layers is logically (or conceptually) easy, and the layout of a hierarchical database is secure.

    Data Sharing:

    Because all the records are held in a shared database, data sharing develops into practical.

    Data Security:

    The hierarchical model were the first database structure that gives information security that is upheld and required by the DBMS.

    Data Independence:

    The DBMS builds up a domain in which data independence can be maintained. This eminently diminishes the programming effort and program maintenance.

    Data Integrity:

    Given the parent/child relationship, there is continuously an association between the parent segment and child segment under it. Because the child segments are necessarily referenced to its parent, this model promotes data integrity.

    Efficiency:

    The hierarchical data model is hugely effective when the database includes a huge number of data in one-to-many (1: m) relationships and when the customers needed huge numbers of amounts using records whose connections are constant over time.

    Available expertise:

    Due to a huge number of feasible installed mainframe computer base, experienced programmers were available.

    Tried business applications:

    There was a huge number of tried and proper commercial enterprise applications possible within the mainframe environment.

    Disadvantages of Hierarchical Data Model

    Following are the disadvantages of hierarchical data model:

    Implementation Complexity:

    Although the hierarchical database is conceptually simple, clean to layout, and no data independence problem, it is quite complicated to implement.

    The DBMS needed knowledge of the physical level of data storage, and the database creator should have excellent knowledge of the physical data storage characteristics. Any changes inside the database architecture, which includes the relocation of segments, needed changes in all function programs that access the database.

    Inflexibility:

    The hierarchical database damage adaptability. The innovation inside the new relations or fragments frequently income very challenging system management functions. A deletion of one segment may additionally cause the involuntary termination of all segments beneath it. Such an error may be costly.

    Lack of structural independence:

    Structural independence exists while the modifications to the database mechanism do not affect on the DBMS potential to access data. The hierarchical database is called a navigational system because data access needed that the preorder traversal is used to navigate to the best segments. So the application programmer should have a good knowledge of the relevant access directions to access the record from the database.

    Application programming complexity:

    Application programming is very time consuming and difficult. Due to the structural dependence and the navigational architecture, the application programmers and the end-clients have to know precisely how the record is assigned physically in the database and how to write lines of control codes to create data.

    No Standards:

    There is not any precise set of standards concept, nor does the function of the model conforms to a particular standard in a hierarchical data model.

    Extensive programming efforts:

    Use of hierarchical data model needed extensive programming action, and therefore, it has been known as a system developed by programmers for programmers. The modern data processing environment does not accept such concepts.

    Network Data Model

    This is an extension of a Hierarchical model. In this model, information is composed more like a graph and is permitted to have more than one parent node.

    Figure shows a network structure.

    Types of Data Models
    Records and Sets

    A network database consists of any number of named data types whose mechanisms are entirely defined in the schema. A record includes any number of data components or fields. Data components are the lowest unit of data. Each data element corresponds to an attribute, and the file corresponds to an entity. The model enables data elements to be grouped within a record.

    A diagram known as a Bachman diagram is used to describe a network database structure. This diagram corresponds to a network graph in which nodes were replaced via rectangles that represent records, and links are displayed by lines linking the rectangles.

    A plex architecture with only two record types is shown in the figure.

    Types of Data Models

    Figure displays the occurrence of the plex structure.

    Types of Data Models

    The network model is more symmetrical than the hierarchical model.

    There are three functions on Network Model
    1. Insertion:

      A new component or supplier can be simply inserted.

    2. Deletion:

      Deletion operation is effortless, the only link is to be deleted. No data is lost. For example, delete PART 2, we delete the connector record occurrence connecting this part.

    3. Updation:

      Suppose supplier B supplies PART 1 in place PART 2, we can create this change quickly changing the link of SUPPLIER B from PART 2 to PART 1. Hence, updation is also very simple in this model.

    Advantages of Network Data Model

    Following are the advantages of the network data model:

    Simplicity:

    It is the same as the hierarchical data model, the network model is also clean and comfortable to design.

    Superior data access:

    A function can access an owner record and all the members’ data within a set. If a member data in the set has two or more (like a faculty working for two departments), then one can change from one owner to another.

    Database Integrity:

    The system model approves database integrity and does not engage a member to exist without an owner. First of all, the customer should represent the owner’s record and then the member.

    Database Standards:

    Unlike the hierarchical model, the network data model is based on the universal requirements developed by DBTG/CODASYL and augmented by ANSI-SPARC. All the network data models support to those standards, which also contains a DDL and DML.

    Disadvantage of Network Data Model

    Following are the disadvantages of network data model:

    System Complexity:

    Like the hierarchical data model, the network model also supports a navigational access structure to the record in which the data are created one file at a time. This structure forms the system function very complex.

    Absence of structural independence:

    It is trying to create transformation in the system database. If changes are made to the database design, all subschema definitions must be revalidated before any application functions can create the database.

    Relational Data Model

    The relational model is based on the theory of a relation, which is physically defined as a table. In this model, tables are used to hold data about the object to be defined in the database. A relation is described as a two-dimensional table in which the rows of the table correlate to single data, and the column correlates to attributes. Each row is known as a tuple, and each column is known as an attribute.

    For example, the figure shows an instance of the STUDENT table. The STUDENT relation is represented by the STUDENT table, having columns for attributes STUID, SNAME, SUBJECT, AND MARKS. A column contains the value of a single attribute, for example, the STUID contains only ID’s of students. The domain of an attribute is the set of proper values for that attribute. Hence, a domain is a pool of values from which the actual costs appearing in a given column are drawn.

    For example, the value appearing in the STUID column are drawn from the domain of all valid STUID. Domains may be definite, or two or more attributes may have the similar domain.

    Types of Data Models

    There are three functions on the Relational Model

    1. Insertion:

      A new student can be inserted quite easily. So, in the relational model, insertion is quite easy.

    2. Deletion:

      Deletion is also secure. For example, delete a tuple from STUDENT relation in a figure whose STUID is 1001.

    3. Updation:

      Updation is also easy. For example, change the subject of a student whose STUID is 1005 from History to Hindi.

    Hence in the relational model, insertion, deletion, and updation operation are quite.

    Advantages of the Relational Data Model

    Following are the advantages of a relational data model

    Simplicity:

    A relational data model is elementary then the hierarchical and network models. It frees the designers from the actual physical data storage details, thereby allowing them to concentrate on the logical view of the database.

    Structural Independence:

    Unlike hierarchical and network models, the relational data model does not depend on the navigational data access system. Modify in the database structure don’t influence the information get to.

    Disadvantages of the Relational Data Model

    Following are the disadvantages of the relational data model

    • For large databases, the performance in responding to queries is degraded.
    • The processing requirements want to develop the indexes. So, the index position of the document must be generated and maintained along with the document records themselves.
    • The file index must be searched continuously before the actual file data are required. This wastes time.
    Entity-Relationship Model

    Entity-Relationship Model or ER Model is a high-level data model structure. In this model, we define the real-world problem in the diagrammatical form to make it simple for the stakeholders to recognize. It is also secure for the designers to recognize the system via just searching at the ER diagram.

    ER diagram has the following three elements:

    • Entities:

      Entity is a real-world thing. It may be an individual, place, or maybe an idea. Example: Teachers, Students, Course, Building, Department, and so on are some of the entities of a School Management System.

    • Attributes:

      An entity comprises of a real-world property known as attribute. This is the features of that attribute. Example: The entity teacher has the property like teacher id, salary, age, etc.

    • Relationship:

      Relationship tells how two attributes are linked. Example: The teacher works for a department.

    Example
    Types of Data Models

    In the above structure, the entities are Teacher and Department. The attributes of the Teacher entity are Teacher_Name, Teacher_id, Age, Salary, Mobile_Number. The attributes of entity Department entity are Dept_id, Dept_name. The two entities are connected using the relationship. Here, each teacher works for a department.

    Advantages of ER Model

    Following are the advantages of ER Model

    Simple:

    Conceptually ER Model is easy to create. If we recognize the connection between the attributes and the entities, we can essentially create the ER Diagram for the model.

    Effective Communication Tool:

    This structure is utilized extensively via the database creators for communicating their concepts.

    Easy Conversion to any Model:

    This model structure well to the relational model and can be effectively changed relational model by transforming the ER model to the table. This model can also be transformed to some other structure like network model, hierarchical model, etc.

    Disadvantages of ER Model

    Following are the disadvantages of ER Model

    No industry standard for notation:

    There is no industry standard for making an ER model. So one creator may utilize notations that are not understood by various developers.

    Hidden information:

    Some data may be lost or covered up inside the ER model. As it is a high-level view, so there are potential outcomes that a few records of data might be covered up.

    Object-Based Data Model

    It is based on a group of objects. An object includes values saved in an instance variable within the object. An object also contains bodies of code that operate on the object that include similar types of costs, and the same functions are grouped with classes. The only method an object ‘A’ can create data elements of ‘B’ is through B’s interface.

    Flat Data Model

    It is a natural model in which the database is defined as a table, including rows and columns. To create any data, the system has to read the whole table.

    Semi-structured Data Model

    A semi-structured data model is a self-describing data model, in this, the information which is generally related to the scheme include within the record, and this property is defined as the self-describing property.

    Associative Data Model

    The associative model has a division property, and this split the real world things about which information is to be recorded in two methods i.e. between entities and associations. Thus, this model does the division to split the real-world information to the entities and associations.

    Enroll Yourself in Live Training: DBMS Training

    Copyright 1999- Ducat Creative, All rights reserved.