Contents

What is DBMS?

What is a Database?

A Database is an organized collection of data that can be easily accessed, managed, and updated. It is like a digital locker where your data is stored in a structured way.

What is a Database Management System (DBMS)?

A DBMS is a software system that interacts with users, applications, and the database itself to capture and analyze data.

It provides the tools to:

  • Define (create tables, schemas, etc.)
  • Manipulate (insert, update, delete)
  • Retrieve (querying using SQL)
  • Control access (authorization, backup)

Why do we need a DBMS?

NeedExplanation
Data Redundancy ControlAvoid storing same data at multiple places
Data ConsistencySingle update changes data everywhere
Efficient Data AccessFast and optimized querying
Data IntegrityEnsures accuracy with constraints (e.g. unique, not null)
Data SecurityUsers can be given restricted access (only view, no delete)
Backup and RecoveryCan restore data after crash or failure
Multi-User Access ControlMultiple people can access database safely at same time
AbstractionHides internal data structure, shows only necessary info (logical view)

Types of DBMS

  1. Hierarchical DBMS
  2. Network DBMS
  3. Relational DBMS (RDBMS)
  4. Object-Oriented DBMS
  5. NoSQL DBMS (Non-relational)

We moved from one to another because of increasing data complexity, need for flexibility, and better performance.

Hierarchical DBMS

  • Data is stored in tree-like structure.
  • Each record has only one parent and can have multiple children.
  • Think like a file system (C:\Folder\Subfolder\Files)

Example:

  • An employee record belongs to one department, and each department has multiple employees.

Pros:

  • Easy to navigate with parent-child links.
  • Fast access if hierarchy is known.

Cons:

  • Very rigid.
  • Difficult to reorganize structure.
  • Doesn’t support complex relationships (e.g. many-to-many).

Example DBMS: IBM’s IMS

Network DBMS

  • Extension of hierarchical model.
  • Records can have multiple parents and multiple children.
  • Uses pointers (like graphs) to define relationships.

Example:

  • A student can enroll in multiple courses, and each course can have many students.

Pros:

  • More flexible than hierarchical.
  • Handles complex relationships.

Cons:

  • Still needs predefined structure.
  • Data access via pointers is complex to manage.

Example DBMS: Integrated Data Store (IDS)

Relational DBMS (RDBMS)

  • Introduced by E.F. Codd in 1970 (revolutionary idea!)
  • Stores data in tables (relations).
  • Tables have rows (records) and columns (fields).
  • Uses SQL (Structured Query Language) for operations.

Example:

  • A Users table with columns: ID, Name, Email
  • A Orders table with columns: OrderID, UserID, Amount
  • We can join tables using keys (UserID)

Pros:

  • Simple and powerful querying with SQL.
  • Data independence and integrity.
  • Widely adopted and supported.

Cons:

  • Not ideal for very complex or hierarchical data.
  • Slower for huge scale data (billions of rows).
  • Relational constraints add overhead.

Example DBMS: MySQL, PostgreSQL, Oracle, MS SQL Server

Object-Oriented DBMS (OODBMS)

  • Stores data as objects, like in Object-Oriented Programming.
  • Each object contains both data and methods.
  • Useful when your app is written in OOP languages like Java, Python, C++

Example:

  • An object Car with attributes (color, model) and methods (start(), stop())

Pros:

  • Great for complex data like CAD, multimedia, engineering.
  • Matches programming model.

Cons:

  • Not easy for traditional data analytics.
  • Slower adoption.

Example DBMS: db4o, ObjectDB

NoSQL DBMS (Non-relational)

  • Designed for Big Data, real-time web apps, and scalability.
  • Doesn’t require fixed schema.
  • Handles unstructured, semi-structured data (JSON, XML, etc.)
  • 4 Types:
    • Key-Value Store (Redis)
    • Document Store (MongoDB)
    • Column Store (Cassandra)
    • Graph DB (Neo4j)

Example:

  • MongoDB stores: { “_id”: 1, “name”: “Alice”, “orders”: [ {“item”: “Book”, “price”: 250}, {“item”: “Pen”, “price”: 20} ] }

Pros:

  • Highly scalable and fast.
  • Flexible data formats.
  • Great for distributed systems and cloud-based apps.

Cons:

  • Less standardization.
  • ACID compliance not guaranteed (eventual consistency instead).
  • Querying is not as powerful as SQL for relational data.

Why the Transition?

FromToReason
HierarchicalNetworkNeeded to support many-to-many relationships
NetworkRelationalSimplify access, reduce complexity, and use SQL
RelationalObjectNeeded support for complex, non-tabular data (images, multimedia)
ObjectNoSQLNeed to handle large-scale, unstructured, distributed data

Real-World Use Cases

  • RDBMS: Banking systems, ERP software, online shopping (Amazon orders)
  • NoSQL: Social media apps (Instagram, Facebook), IoT devices, recommendation engines
  • OODBMS: CAD/CAM tools, scientific applications

Summary Table:

DBMS TypeStructureBest ForExample
HierarchicalTreeOrganization chartsIBM IMS
NetworkGraphComplex inter-linked dataIDS
RelationalTableMost business appsMySQL, Oracle
Object-OrientedObjectsOOP-heavy appsdb4o, ObjectDB
NoSQLFlexible DocsBig Data, scalable web appsMongoDB, Redis