● A data model is a conceptual framework for structuring and organizing data in a
database.
● It defines how data is stored,accessed and manipulated within the DataBase
Management Systems(DBMS).
● Data models help in designing databases efficiently by defining the relationships
between different data elements.
TYPES OF DATA MODELS:-
1. HIERARCHICAL MODEL:-
● Organizes data in a tree-like structure with parent-child relationships.
● Each parent node can have multiple child nodes, but each child has only one parent.
● Uses pointers to establish relationships between records.
● Commonly used in applications like file systems and XML databases.
● Example:-
An organization where a Manager (parent) has multiple Employees (children).
2. NETWORK MODEL:-
● Represents data in the form of a graph (multiple parent-child relationships).
● Each record (node) can have multiple parent and child nodes.
● Uses pointers or links to create many to many relationships.
● More flexible than the hierarchical model.
● Example:-
An university database where students can be linked to multiple courses and each
course can have multiple students.
3. RELATIONAL MODEL:-
● Organizes data in tables (relations) consisting of rows (tuples) and columns
(attributes).
● Uses keys (Primary key, Foreign key) to establish relationships between tables.
● Provides data integrity, consistency and security.
● Data is manipulated using SQL(Structured Query Language).
● Example:-
A customer database Where orders, customers and products are stored in different
tables and linked using customer IDs.
4. ENTITY-RELATIONSHIP(ER) MODEL:-
● The ER Model is a high level conceptual model used to design databases.
● It usually represents:-
Entities:- Real world objects like student, employee.
Attributes:- Properties of an entity ex- Name, Age.
Relationships:- Associates between entities ex- “Student enrolls in course”.
● Example:-
An university database with
entities like students, courses and professors, where students enrolls in courses and
professors teach courses.