Data models (Relational, Hierarchical, Network)
Data Models: A Formal Approach A data model is a comprehensive representation of a real-world database, encompassing its structure, entities, and relatio...
Data Models: A Formal Approach A data model is a comprehensive representation of a real-world database, encompassing its structure, entities, and relatio...
A data model is a comprehensive representation of a real-world database, encompassing its structure, entities, and relationships. It acts as a blueprint, outlining how data is organized and stored for efficient manipulation and retrieval.
There are three main types of data models:
1. Relational Model (RDBMS)
Imagine a library with books as entities and pages as a relation between them.
Each book has properties like title, author, and ISBN, and each page has properties like title, author, and location.
Relationships are established using foreign keys, ensuring data consistency.
The RDBMS uses complex queries and joins to retrieve and manipulate data efficiently.
2. Hierarchical Model (relational database)
This model resembles a tree structure, with nodes representing entities and edges representing relationships.
Each node has a parent and child, with a maximum depth of 1.
Records are linked to their parent in a hierarchy.
The hierarchical model is easy to understand but may not be suitable for complex relationships.
3. Network Model
This model resembles a network with nodes representing entities and links representing relationships.
There are multiple levels of nodes, with entities being connected to other entities through links.
Records are distributed across multiple nodes, ensuring availability and redundancy.
The network model is flexible and can handle complex relationships but can be challenging to manage.
These models are used to represent different types of data structures and relationships. Each model has its strengths and weaknesses, and the choice depends on the specific needs of the database.
Examples:
Relational model: A library database, a shopping cart system, a financial database.
Hierarchical model: A directory structure, an employee hierarchy, a social network.
Network model: A star schema, a graph database, a distributed system