Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Types of DBMS Models
DBMS

Types of DBMS Models

Understand the evolution of data models: Hierarchical, Network, and Relational DBMS.

Types of DBMS Models

Before the Relational model became the global standard, databases went through several evolutionary stages. Understanding these helps you appreciate why we use SQL today.


Learning Objectives

After completing this chapter, you will be able to:

  • Describe the Hierarchical, Network, and Relational data models.
  • Explain the advantages and disadvantages of each model.
  • Understand why the Relational model won.
  • Differentiate between DBMS and RDBMS.
  • Compare modern NoSQL models with the classic models.
  • Answer interview questions on DBMS types.

1. Hierarchical Model (1960s-1970s)

Structure: Data is organized as a tree — parent-child relationships, with each child having exactly one parent.

                        Organization
                       /      |       \
                 Finance    HR      Engineering
                 /    \       |       /    |    \
           Payroll  Budget  Hiring  Dev   QA   Ops

Representation: Records connected via pointers. Navigation is top-down from root to leaves.

ProsCons
Very fast for simple lookupsCannot handle M:N relationships
Easy to understand (like a file system)Structural changes are difficult
Good for hierarchical data (org charts)Data must be accessed via parent path

Examples: IBM IMS (still used in banking mainframes), Windows Registry, XML files.


2. Network Model

Structure: A graph-like structure where records can have multiple parents.

      Student A ──┐
                  ├── Course X
      Student B ──┤
                  ├── Course Y
      Student C ──┘

Representation: Sets and pointers. Each record can be a member of multiple sets, enabling M:N relationships.

ProsCons
Supports M:N relationshipsExtremely complex to design
More flexible than hierarchicalNavigation requires knowing pointer paths
Fast access via predefined pathsNo data independence (change breaks apps)

Legacy: Influenced modern Graph Databases (Neo4j). The complexity killed it for general use.


3. Relational Model (Current Standard)

Structure: Data in tables (relations) with rows (tuples) and columns (attributes). Relationships enforced via keys (Primary/Foreign).

Student Table                    Course Table
┌─────────┬─────────┐           ┌──────────┬───────────┐
│ Std_ID  │ Name    │           │ Course_ID│ Title     │
├─────────┼─────────┤           ├──────────┼───────────┤
│ 101     │ Rahul   │           │ C01      │ DBMS      │
│ 102     │ Priya   │           │ C02      │ OS        │
└─────────┴─────────┘           └──────────┴───────────┘

Enrollment Table
┌─────────┬──────────┐
│ Std_ID  │ Course_ID│
├─────────┼──────────┤
│ 101     │ C01      │
│ 101     │ C02      │
│ 102     │ C01      │
└─────────┴──────────┘
ProsCons
Logical data independenceJoins can be expensive
SQL — declarative query languageRequires normalization
Mathematically sound (relational algebra)Less natural for complex relationships
Easy to understand and use

Examples: MySQL, PostgreSQL, Oracle, SQL Server, SQLite.


DBMS vs RDBMS

FeatureDBMSRDBMS
Data modelHierarchical, Network, Relational, etc.Relational (tabular) only
RelationshipVia pointers (hierarchical/network)Via keys (Primary/Foreign)
NormalizationNot requiredRequired for integrity
Distributed supportLimitedStrong
ACID complianceVariesStandard
Query languageModel-specificSQL (standardized)
ExamplesIMS, MongoDB, RedisMySQL, PostgreSQL, Oracle

Key insight: All RDBMS are DBMS, but NOT all DBMS are RDBMS.


DBMS vs RDBMS Comparison Table

AspectDBMSRDBMS
StorageAs files, hierarchical, or other formatsTables with rows and columns
KeysMay not have keysPrimary Key, Foreign Key mandatory
IntegrityApplication-managedDBMS-enforced (constraints)
NormalizationNot supportedSupported and encouraged
SecurityBasicGranular (user roles, views)
Multi-userLimitedFull concurrency control
SQLMay not supportFull SQL support
ACIDPartialFull

NoSQL and Modern Models

NoSQL databases are non-relational DBMS that emerged for web-scale applications:

TypeExampleUse Case
DocumentMongoDBJSON-like flexible schemas
Key-ValueRedisCaching, session storage
Column-FamilyCassandraTime-series, IoT data
GraphNeo4jSocial networks, fraud detection

These are DBMS (not RDBMS) because they don’t use the relational model.


Interview Deep Dive

Q: Why did the Relational model replace the Network model?

A: Because the Relational model provides Logical Data Independence. In the Network model, the user had to know the physical pointer paths to access data. In the Relational model, you specify what you want (SQL), and the system figures out how to get it. This separation made applications much easier to build and maintain.

Q: Is the Hierarchical model still used anywhere?

A: Yes. Modern XML files and the Windows Registry are essentially hierarchical. Also, some high-performance legacy systems (like IBM IMS) still use it for specific high-speed operations in banking and airline reservation systems.

Q: Does the Network model remind you of any modern database type?

A: Yes — modern Graph Databases (like Neo4j) are a sophisticated evolution of the network model, designed specifically to handle complex relationships that are expensive to represent in relational tables.

Q: Is MongoDB a DBMS or RDBMS?

A: MongoDB is a DBMS, not an RDBMS. It stores data as documents (JSON-like objects), not tables with rows and columns. It doesn’t enforce relationships via foreign keys. It is a document-based NoSQL DBMS.


Key Takeaways

  • The Hierarchical Model uses a tree structure — fast but rigid (no M:N).
  • The Network Model uses a graph — flexible but complex.
  • The Relational Model uses tables with keys — simple, mathematically sound, and standard.
  • All RDBMS are DBMS, but not all DBMS are RDBMS.
  • The relational model won because of data independence and SQL.
  • NoSQL databases are non-relational DBMS optimized for modern web-scale use cases.

My Private Notes

Notes are auto-saved locally to this device.