Data Models
Data models are a collection of conceptual tools for describing data schemas, data relationships, and constraints. They dictate the overarching structure of how databases store and correlate entities.
1. Object-Based Data Models
Object-based data models are heavily inspired by Object-Oriented Programming (OOP). An object is a collection of data representing a meaningful entity, complete with characteristics.
Properties:
- Declarative Properties: Instance variables or attributes (e.g., student name).
- Procedural Properties: Methods used for defining operations (e.g., calculating gross salary).
- Encapsulation: Combining data and methods, hiding the internal implementation from the outside world.
- Inheritance: Sub-classes inherit logic from parent classes, reducing redundancy.
2. Record-Based Data Models
These are used to specify the overall logical structure of the database, often defining access patterns without deep object relationships. The widely used record-based models are:
(i) Hierarchical Model
Data is structured in a tree-like hierarchy. Each record has one parent and can have multiple children.
(ii) Network Model
A generalization of the hierarchical model, where a record can have multiple parents.
(iii) Relational Model
The relational model stores data in two-dimensional tables (relations).
| Student-Name | Class | Stream |
|---|---|---|
| Midhun | XII | Science |
| Nithin | XI | Commerce |
3. Physical Data Models
Physical data models describe the internal storage structure of the data and mechanisms for their access. They outline low-level structures such as indexing layouts, linking tables, hash mappings, and partitioned tables.
This model is the closest bridge between logical design and the raw constraints placed by specific database engines like MySQL, Oracle, or PostgreSQL.