Data Models & DBMS Architecture Explorer

Different Data Models

Data models define how data is organized, stored, and accessed in a database management system (DBMS). Below are explanations of four common data models with small examples.

Relational Model

The relational model organizes data into tables (relations) consisting of rows (tuples) and columns (attributes). It uses keys to establish relationships between tables.

Example: A simple "Employees" table.

| ID | Name    | Department |
|----|---------|------------|
| 1  | Alice   | HR         |
| 2  | Bob     | IT         |
| 3  | Charlie | Sales      |
            

Hierarchical Model

The hierarchical model organizes data in a tree-like structure with parent-child relationships, where each child has only one parent.

Example: Company organization chart.

CEO
├── Manager HR
│   └── Employee Alice
└── Manager IT
    └── Employee Bob
            

Network Model

The network model allows more complex relationships where a child can have multiple parents, represented as a graph with records and sets.

Example: Students and Courses (a student can enroll in multiple courses, a course can have multiple students).

Student A ── Enrolls ── Course 1
Student A ── Enrolls ── Course 2
Student B ── Enrolls ── Course 1
            

Document Model

The document model stores data in flexible, semi-structured documents (e.g., JSON or XML), allowing nested structures without a fixed schema.

Example: A user profile document.

{
  "id": 1,
  "name": "Alice",
  "address": {
    "street": "123 Main St",
    "city": "Anytown"
  },
  "hobbies": ["reading", "traveling"]
}
            

Visual Comparison of Centralized vs Client-Server Architecture

DBMS architectures define how the database system is structured in terms of processing and data distribution. Below is a visual comparison using diagrams with flow animations.

Centralized Architecture

All processing and data storage occur on a single central machine. Users access it directly.

Flowchart of DBMS centralized architecture

Client-Server Architecture

Clients handle user interfaces and some processing, while the server manages the database and heavy operations. Communication occurs over a network.

Flowchart of DBMS centralized architecture