• A Data Model is a set of concepts that can be used to describe the
structure of data in a database.
• A database model shows the logical structure of a database, including
the relationships and constraints that determine how data can be
stored and accessed.
• Data Models are used to support the development of information
systems by providing the definition and format of data to be involved
in future systems.
• Data model also gives idea about possible alternatives to achieve
targeted solution.
Data Model Introduction:
• E-R Model
• Hierarchical Model
• Network Model
• Relational Model
Types of Data
Models:
• The Entity-Relationship Model
• The entity-relationship (E-R) data model is based on a perception of a real
world that consists of a collection of basic objects, called entities, and of
relationships among these objects.
• An entity is a “thing” or “object” in the real world that is distinguishable from
other objects. For example, each person is an entity, and bank accounts can
be considered as entities.
• Entities are described in a database by a set of attributes.
• A relationship is an association among several entities.
E-R Model
• The set of all entities of the same type and the set of all relationships of the same
type are termed an entity set and relationship set, respectively.
• The overall logical structure (schema) of a database can be expressed graphically by
an E-R diagram.
• Rectangles, which represent entity sets
• Ellipses, which represent attributes
• Diamonds, which represent relationships among entity sets
• Lines, which link attributes to entity sets and entity sets to relationships.
E-R Model
E-R Model
• This model is developed by IBM and North American Rockwell Known as
Information Management System.
• This is the oldest and simplest DBMS model.
• The model is sorted hierarchical, either in top down or bottom up approach of
designing.
• This model uses pointers to navigate between stored data.
Hierarchical Model:
Example of Hierarchical
Model:
• One parent node can have many child nodes ,but one child cannot have
more than one parent.
• Relationship is one to many.
1. Conceptual simplicity
• Relationship between various level is logically very simple. Hence
database structure becomes easier to view.
2. Database Security
• Security is given by DBMS system itself.
3. Simple creation, updation and access
• This model is simple to construct with help of pointers .
• Easy to understand .
• Easy to delete and add records in the database using pointers .
• This is faster and easy data retrieval through higher level records
in tree structure.
Advantages of Hierarchical
Model:
4. Database Integrity
• There is parent child association between different levels of
records in files.
• Child record is attached with the parent record which maintains
the integrity.
5. Efficiency
• This model having good performance when database contains
large amount of data in which one record has many related
records like a class contains many students studying in it.
Advantages of Hierarchical
Model:
1. Complex Implementation
• Programmers and designers need to have knowledge of physical
data storage which may be complex.
2. Difficult to manage
• Any change in a location of data needs change in all
application programs.
• Data access is restricted by pointer path.
3. Limitations in implementation
• It is difficult to implement many to many relationship.
Disadvantages of Hierarchical
Model:
• This model is similar to hierarchical model, this model also uses
pointers toward data but there is no need of parent to child
association .
• It uses graph data structure.
• A child node can have more than one parent node.
• It has one to many or many to many relationship.
• A relationship between any two record types is called as a set.
• Data in network model are represented by collection of records and
relationships among data are represented by links, which can be viewed
as pointers.
Network Model:
Example of Network Model:
1. Simple design
• The network model is simple and easy to design and
understand.
2. Ability to handle many types of relationship
• The network model can handle the one to many or many to many
or other relationships.
3. Ease of data access
• In a network model, an application can access a root(parent)
record and all the member records within a SET (child).
4. Data Integrity
• In a network model, no member can exist without a parent
entity.
• A user must first define the root record and then the child
record.
Advantages of Network Model:
5. Data Independence
• In network model, application programs work independently of the
data.
Advantages of Network Model:
1. System Complexity
• In a network model, data are accessed one record at a time.
• This can increase the complexity of system for accessing multiple
records at a time.
2. Lack of structural independence
• Any changes made to the database structure require the
application programs to be modified before it can access data.
Disadvantages of Network Model:
• The Relational Model is first proposed by E.F Codd.
• This model uses collection of tables to represent relationships amongst
the data.
• In this model, each database item is viewed as a record with attributes.
A set of records with similar attributes is called a TABLE. Each table
contains a record of a particular type.
• The database uses Relational model called as RDBMS .
• A Relational database is a collection of 2-D tables which consist of rows
and columns.
Relational Model:
• Relational model is the most popular model and the most extensively
used model.
• In this model the data can be stored in the “tables” and this storing is
called as “relation”, the relations can be normalized and the normalized
relation values are called atomic values.
• Each row in a relation contains unique value and it is called as “tuple”,
each column contains value from same domain and it is called as
“attribute”.
• Most of the popular commercial DBMS products like Oracle, Sybase ,
MySQL, are based on relational model.
Relational Model:
• A particular attribute or combination of attributes is chosen as a
primary key that can be referred to in other tables, when it’s called a
foreign key.
• The model also accounts for the types of relationships between
those tables, including one-to-one, one-to-many, and many-to-many
relationships.
• Within the database, tables can be normalized that make the database
flexible, adaptable, and scalable. When normalized, each piece of data
is atomic, or broken into the smallest useful pieces.
Relational Model:
Example of Relational Model:
• A relational database supports relational algebra and also relational
operations of the set theory like union, intersection, difference,
relational database also support select, project, join and division
operations.
• For data access in RDBMS we have query language SQL. Most of the
database vendors support the SQL standards.
• Relational databases support the concept of user rights, every user
is assigned with some database permission called as user rights.
• Relational databases are scalable and provide good support for the
implementation of distributed systems and other advanced database
systems.
Advantages of Relational Model:

Database Introduction to Data Models.pptx

  • 1.
    • A DataModel is a set of concepts that can be used to describe the structure of data in a database. • A database model shows the logical structure of a database, including the relationships and constraints that determine how data can be stored and accessed. • Data Models are used to support the development of information systems by providing the definition and format of data to be involved in future systems. • Data model also gives idea about possible alternatives to achieve targeted solution. Data Model Introduction:
  • 2.
    • E-R Model •Hierarchical Model • Network Model • Relational Model Types of Data Models:
  • 3.
    • The Entity-RelationshipModel • The entity-relationship (E-R) data model is based on a perception of a real world that consists of a collection of basic objects, called entities, and of relationships among these objects. • An entity is a “thing” or “object” in the real world that is distinguishable from other objects. For example, each person is an entity, and bank accounts can be considered as entities. • Entities are described in a database by a set of attributes. • A relationship is an association among several entities. E-R Model
  • 4.
    • The setof all entities of the same type and the set of all relationships of the same type are termed an entity set and relationship set, respectively. • The overall logical structure (schema) of a database can be expressed graphically by an E-R diagram. • Rectangles, which represent entity sets • Ellipses, which represent attributes • Diamonds, which represent relationships among entity sets • Lines, which link attributes to entity sets and entity sets to relationships. E-R Model
  • 5.
  • 6.
    • This modelis developed by IBM and North American Rockwell Known as Information Management System. • This is the oldest and simplest DBMS model. • The model is sorted hierarchical, either in top down or bottom up approach of designing. • This model uses pointers to navigate between stored data. Hierarchical Model:
  • 7.
    Example of Hierarchical Model: •One parent node can have many child nodes ,but one child cannot have more than one parent. • Relationship is one to many.
  • 8.
    1. Conceptual simplicity •Relationship between various level is logically very simple. Hence database structure becomes easier to view. 2. Database Security • Security is given by DBMS system itself. 3. Simple creation, updation and access • This model is simple to construct with help of pointers . • Easy to understand . • Easy to delete and add records in the database using pointers . • This is faster and easy data retrieval through higher level records in tree structure. Advantages of Hierarchical Model:
  • 9.
    4. Database Integrity •There is parent child association between different levels of records in files. • Child record is attached with the parent record which maintains the integrity. 5. Efficiency • This model having good performance when database contains large amount of data in which one record has many related records like a class contains many students studying in it. Advantages of Hierarchical Model:
  • 10.
    1. Complex Implementation •Programmers and designers need to have knowledge of physical data storage which may be complex. 2. Difficult to manage • Any change in a location of data needs change in all application programs. • Data access is restricted by pointer path. 3. Limitations in implementation • It is difficult to implement many to many relationship. Disadvantages of Hierarchical Model:
  • 11.
    • This modelis similar to hierarchical model, this model also uses pointers toward data but there is no need of parent to child association . • It uses graph data structure. • A child node can have more than one parent node. • It has one to many or many to many relationship. • A relationship between any two record types is called as a set. • Data in network model are represented by collection of records and relationships among data are represented by links, which can be viewed as pointers. Network Model:
  • 12.
  • 13.
    1. Simple design •The network model is simple and easy to design and understand. 2. Ability to handle many types of relationship • The network model can handle the one to many or many to many or other relationships. 3. Ease of data access • In a network model, an application can access a root(parent) record and all the member records within a SET (child). 4. Data Integrity • In a network model, no member can exist without a parent entity. • A user must first define the root record and then the child record. Advantages of Network Model:
  • 14.
    5. Data Independence •In network model, application programs work independently of the data. Advantages of Network Model:
  • 15.
    1. System Complexity •In a network model, data are accessed one record at a time. • This can increase the complexity of system for accessing multiple records at a time. 2. Lack of structural independence • Any changes made to the database structure require the application programs to be modified before it can access data. Disadvantages of Network Model:
  • 16.
    • The RelationalModel is first proposed by E.F Codd. • This model uses collection of tables to represent relationships amongst the data. • In this model, each database item is viewed as a record with attributes. A set of records with similar attributes is called a TABLE. Each table contains a record of a particular type. • The database uses Relational model called as RDBMS . • A Relational database is a collection of 2-D tables which consist of rows and columns. Relational Model:
  • 17.
    • Relational modelis the most popular model and the most extensively used model. • In this model the data can be stored in the “tables” and this storing is called as “relation”, the relations can be normalized and the normalized relation values are called atomic values. • Each row in a relation contains unique value and it is called as “tuple”, each column contains value from same domain and it is called as “attribute”. • Most of the popular commercial DBMS products like Oracle, Sybase , MySQL, are based on relational model. Relational Model:
  • 18.
    • A particularattribute or combination of attributes is chosen as a primary key that can be referred to in other tables, when it’s called a foreign key. • The model also accounts for the types of relationships between those tables, including one-to-one, one-to-many, and many-to-many relationships. • Within the database, tables can be normalized that make the database flexible, adaptable, and scalable. When normalized, each piece of data is atomic, or broken into the smallest useful pieces. Relational Model:
  • 19.
  • 20.
    • A relationaldatabase supports relational algebra and also relational operations of the set theory like union, intersection, difference, relational database also support select, project, join and division operations. • For data access in RDBMS we have query language SQL. Most of the database vendors support the SQL standards. • Relational databases support the concept of user rights, every user is assigned with some database permission called as user rights. • Relational databases are scalable and provide good support for the implementation of distributed systems and other advanced database systems. Advantages of Relational Model: