What is Data Model in DBMS | Traditional data models in dbms |

What is Data Model in DBMS ?

" A model is a representation of reality, real world' objects and events, and their associations."

           Models are a cornerstone of design, Engineers build a model of a car to work out anv details besore putting it into production. In the same manner, system designers develop models to explore ideas and improve the understanding of the database design. 

           Data Madel can be defined as an integrated collection of concepts that can be used to dese ribe the logical structure of the database including data types, relationships between data and constraints that should apply on the data. 

            Dala model emphasizes on what data is needed and how it should be organized instead of what operations need to be performed on the data. Data modeling is the process of creating a data model for the data to be stored in a Database. 

  • Components of Data Model:-
     A data model comprises of following three components:
  1. Structural Part: It consists of a set of rules according to which databases can be comstructed.

  2. Manipulative Part: It defines the types of operation that are allowed on the data. This includes the operations that are used for updating or retrieving data from the dalabase and for changing the structure of the database.

  3. Integrity Rules: Rules, which ensures that the data is accurate. 

  • Importance of Data Model :-
                  Data modeling is likely the most serious and time consuming part of the development process . The real goal of the data model is to verify that all data objects reqired by the business functions are completely and accurately represents .

  1. Data models offer relatively simple representation, usually graphical, of complex real-world data structures.

  2.  Data models can tacilitate interaction among the designer, the applications programmer, and the end user. .

  3.  Good database design uses an appropriate data model as its foundation.

  4. End-users have different views and needs for data. Data model organizes data for various users.

  5. A data model provides a blueprint of the data that is required for a functional system. .

  6. Data model provides a methodology for representing the objects of a particular application environ1meni, and the relationships among these objects. .

  7. The information contained in the data model will be used to define relational tables, primary and foreign keys, stored procedures and packages. 

In short, a good data model is a communication device that helps in eliminates discrepandies between the database desigm's components and the real world data environment

Major events in data modeling incdude: 

  •  Defining the data (such as data types and sizes). 

  •  dentifying the data and assodiated processes. 

  •  Ensuring data integrity.

  •  Defining the data management processe .

  •  Spedifying the data storage requiremen.

Data Model Basic Building Blocks:-

The basic building blocks of all data models are entities, attributes, relationships and constraints .

  1. Entity: Anything about which data are to be collected and stored. Example: Student, Teacher, Employee, Manager)

  2. Attribute: A characteristic of an entity. Example: Name, Salary, Job of an entity employee)

  3. Relationship: An assodiation among (two or more) entities
  •  One-to-one (1:1) relationship
     (Example: Department Vs. Manager)

  •  One-to-many (1: M) relationship
     (Example: Mamager Vs. Employee)

  •  Many-to-one (M: 1) relationship
     (Example: Employee Vs. Manager)

  •  Many-to-many (M: N or M: M) relationship
     (Example: Student Vs. Course)
       4.   Constraint: A constraint is a restriction placed on the data. Constraints important because they help to ensure data integrity. Constraints are norma expressed in the form of rules. 

 For Example 

  1.  An employee's salary must be between 10,000 and 50,000. 

  2.  Each class must have one and only one teacher.

WHAT IS TRADITIONAL DATA MODELS :-
The most widely accepted data models are: 

  1.  Hierarchical Model

  2.  Network Model

  3. Relational Model

  •  Hierarchical Model:-
  1. Hierarchical database model is one of the oldest database models, dating from late 1950s.

  2.  The general shape of this model is like an Organizational chart. A node on the chart represents a particular entity. The terms parent and child are often used m describing a hierarchical model.

  3. This model used the tree as its basic structure. A tree is a data structure that COnsists of a hierarchy of nodes, with a single node, called the root, at the highest lever.

  4. A node representS a particular entity. A node mav have any number of children, Dut each child child node may have only one parent node. This kind of structure is o often referred to as "Inverted Tree"

  5.  The parent-to-child creates one-to-many relationship, but the child-to-parent one-to-one relationship. 

  6. In hierarchical data model, records are arranged in a top-down structure.

  7.  The nodes of the tree represent data records. The relationships are represented as links or pointers between nodes.

  8.  To locate a particular record in a hierarchical database, you have to start at the top of the tree with a parent record and trace down the tree to the child.

  9.  The above figure (Fig. 2.1) shows structure of a hierarchical data model for the University' system. In this example, "University" is the root node and "Departments" are its children. Each department is further divided into branches and so on. 
  • Advantages of Hierarchical Model :-

  1. Simplicity: Since the database is based on the hierarchical structure, the relationship between the various layers is logically simple. 

  2.  Data Security: Hierarchical model was the first database model that offered the data security that is provided by the DBMS.

  3.  Data Integrity: Since it is based on the parent child relationship, there is always a link between the parent segment and the child segment under it.

  4.  Efficiency: It is very efficient because when the database contains a large number of 1:N relationship and when the user requires large number of transaction.

  • Diadvantages of Hierarchical Model:-
  1. Implementation complexity: Although it is simple and easy to design, it is quite Complex to implement.

  2. Operational Anomalies: Hierarchical model suffers from the insert delete and  update anomalies, also retrieval operation is difficult.

WHAT IS NETWORK MODEL ?

  • The network data model was developed to overcome the limited ca hierarchical model. Here, multiple parernt-child relationships are used.

  •  The original network model and language were presented in the Con. (Conference on Data Systems Languages) through its Data Base Task Group (DRTC DASYL is sometimes called the DBTG model.

  • The network model uses a network structure, which is a data structure consisting of nodes and branches.

  •  In this model, there is no distinction between parent and child nodes as in the hierarchical model. Each node may be related to more than one node.

  •  In this model, directed graphs are used instead of tree structure to represent the structure of database. Here, records appearing as nodes and relationships as edges the graph.

  •  The main difference of network model with hierarchical model is that a netwOn model permits a child node to have more than one parent nodes, Wnere hierarchical model does not allows a child node to have multiple parent nodes. 


In the above figure, network data nodel for 'UNIVERSI sy shown. In the figure, the 'Mathematics Department' node is associated vith Computer Department' node. Sinmilarly, 'Conmputer Lab' and 'Library' nodes a associated with both the 'Mathematies Department' and Computer Department nodes.

 Advantages of Network Model:-

  • Conceptual Simplicity: Like hierarehical model, network model is also simple and easy to implement.

  •  Capability to handle more relationship types: The network model can handie one to one (1:1) and many to many (N: N) relationship.

  •  Ease to access data: Rapid and easy access to data is possible in this model due to multiple acoess paths to the data elenments.

  •  Data Integrity: Since it is based on the parent child relationship, there is always a link between the parert segment and the child segment under it.

  •  Data Independence: The network model is better than hierarchical model in case of data independence.

Disadvantages of Network Model :-

  • The most popular data model in DBMS is the Relational Model. The principles of the relational model were first outlined by Dr. E. F. Codd in a June 1970. 

  •  The relational model is considered as one of the most popular developments in the database technology because it can be used for representing most of the real world objects and the relationships between them.

  • Any two tables can be linked irrespective of hierarchical placement. Therefore, any table can be accessed directly without having to access child tables through a hierarchy or network of parent tables.

  •  The relational database relates or connects data in different tables through the use of a common field or attribute.

  •  This model doesn't require any information that specifies how the data should be stored physically.

Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.