DBMS Cheat Sheet

A Database Management System (DBMS) is software that helps store, organize, and manage data efficiently. It allows users to create, read, update, and delete data while ensuring security, consistency, and easy access. Whether you’re a student, developer, or IT professional, having a DBMS cheat sheet is super handy.


Key Concepts in DBMS

1. Database

A collection of related data organized for easy access. Example: Student records, employee details.

2. DBMS

Software that manages databases. Examples: MySQL, Oracle, PostgreSQL, MongoDB.

3. RDBMS

Relational Database Management System – stores data in tables (rows & columns). Example: MySQL, PostgreSQL.


DBMS Architecture

  1. Single-Tier – User directly accesses database.
  2. Two-Tier – Client communicates with database server.
  3. Three-Tier – Client → Application server → Database server.

Types of DBMS

  1. Hierarchical DBMS – Data stored in a tree structure.
  2. Network DBMS – Uses records connected by links.
  3. Relational DBMS (RDBMS) – Stores data in tables.
  4. Object-Oriented DBMS – Stores complex data like images, audio, video.

DBMS Keys

  • Primary Key – Uniquely identifies a record.
  • Foreign Key – Links one table to another.
  • Candidate Key – A column that can qualify as a primary key.
  • Composite Key – Two or more columns combined to form a key.
  • Unique Key – Ensures all values in a column are unique.

SQL Commands

SQL (Structured Query Language) is used in RDBMS.

DDL (Data Definition Language)

  • CREATE TABLE table_name (...); → Create table
  • DROP TABLE table_name; → Delete table
  • ALTER TABLE table_name ADD column_name datatype; → Modify table

DML (Data Manipulation Language)

  • INSERT INTO table_name VALUES (...); → Insert data
  • UPDATE table_name SET column=value WHERE condition; → Update data
  • DELETE FROM table_name WHERE condition; → Delete data

DQL (Data Query Language)

  • SELECT * FROM table_name; → Retrieve data

DCL (Data Control Language)

  • GRANT SELECT ON table_name TO user; → Give access
  • REVOKE SELECT ON table_name FROM user; → Remove access

TCL (Transaction Control Language)

  • COMMIT; → Save changes
  • ROLLBACK; → Undo changes
  • SAVEPOINT name; → Mark a point in transaction

Normalization

Process of organizing data to reduce redundancy.

  1. 1NF (First Normal Form) – No repeating groups, atomic values only.
  2. 2NF (Second Normal Form) – Must be in 1NF + no partial dependency.
  3. 3NF (Third Normal Form) – Must be in 2NF + no transitive dependency.

Transactions in DBMS

A transaction is a unit of work (like transferring money).

Properties (ACID):

  • Atomicity – All or nothing.
  • Consistency – Database remains valid.
  • Isolation – Transactions don’t interfere.
  • Durability – Changes remain permanent.

Concurrency Control

When multiple users access the database simultaneously, DBMS ensures correctness using:

  • Locks – Prevents conflicts.
  • Timestamps – Orders transactions.
  • Deadlock Handling – Detects & resolves resource conflicts.

Advantages of DBMS

Data security
Reduces redundancy
Easy backup & recovery
Multi-user access
Data consistency


Disadvantages of DBMS

High cost of setup
Requires technical expertise
Hardware/software overhead


Popular DBMS Software

  • MySQL – Open-source, widely used.
  • Oracle DB – Enterprise-level, secure.
  • PostgreSQL – Advanced open-source.
  • MongoDB – NoSQL, document-based.
  • MS SQL Server – Microsoft’s relational DBMS.

Quick DBMS Interview Questions

  1. Difference between DBMS & RDBMS?
  2. What are ACID properties?
  3. Explain Primary vs Foreign Key.
  4. What is Normalization?
  5. What is SQL Injection?

Final Thoughts

DBMS is the backbone of modern applications, from banking systems to social media platforms. By understanding the basics—keys, SQL, normalization, and transactions—you can design efficient databases and manage data effectively.


This DBMS Cheat Sheet is a quick guide to revise essential concepts for exams, interviews, or daily development tasks.