Bytes
Web DevelopmentData Science

DBMS Cheat Sheet for Interview 2025

Last Updated: 19th March, 2025
icon

Jay Abhani

Senior Web Development Instructor at almaBetter

A complete DBMS cheat sheet covering key concepts, SQL commands, normalization, indexing and transactions. Perfect for interview preparation and quick reference.

A Database Management System (DBMS) is essential for efficiently storing, retrieving, and managing data in applications. Whether you are preparing for an interview or need a quick reference guide, this DBMS cheat sheet covers key concepts, terminology, and SQL commands in a structured way.

This database management system cheat sheet provides a concise yet detailed overview of DBMS principles, architectures, normalization, indexing, transactions, and SQL queries to help you master DBMS for interviews and real-world applications.

What is DBMS?

A Database Management System (DBMS) is software that allows users to create, read, update, and delete (CRUD) data efficiently. It acts as an intermediary between the user and the database.

Key Functions of DBMS:

Hrere are the keyw features of DBMS (Database Management System):

  • Data Definition – Creating and modifying schema.
  • Data Manipulation – Querying and updating records.
  • Data Security – Ensuring authorized access.
  • Concurrency Control – Managing multiple users.
  • Transaction Management – Maintaining consistency.
  • Backup & Recovery – Preventing data loss.

Types of Databases

DBMS can be classified into various types based on structure and data storage:

Based on Data Model

TypeDescriptionExample
Relational DBMS (RDBMS)Data stored in tables with relationshipsMySQL, PostgreSQL, Oracle
NoSQL DBMSSchema-less, suitable for big dataMongoDB, Cassandra
Hierarchical DBMSData arranged in a tree structureIBM Information Management System
Network DBMSComplex relationships using graph structureIDS (Integrated Data Store)
Object-Oriented DBMSStores objects rather than tablesdb4o, ObjectDB

DBMS Architecture

1-Tier, 2-Tier, 3-Tier Architecture

ArchitectureDescription
1-TierDirect access between the user and database (e.g., local storage).
2-TierClient connects to the database via an application (e.g., JDBC).
3-TierClient → Application Server → Database (e.g., Web Applications).

DBMS Components

  • Database Engine – Manages data storage and retrieval.
  • Query Processor – Interprets and executes SQL queries.
  • Transaction Manager – Handles concurrent access.
  • Storage Manager – Controls physical storage.
  • Metadata Catalog – Stores schema information.

Learn more with these related lessons: Types of Databases, Integrity Constraints in DBMS and Data Models in DBMS

Relational Database Model

A Relational DBMS (RDBMS) organizes data into tables (relations) consisting of rows and columns.

Key Terminologies

TermDefinition
Relation (Table)A collection of rows and columns.
Tuple (Row)A single record in a table.
Attribute (Column)A property of an entity.
Primary KeyA unique identifier for a row.
Foreign KeyA reference to a primary key in another table.
Candidate KeyA set of attributes that uniquely identify a record.
Super KeyA set of attributes that uniquely identify records (includes candidate keys).
Composite KeyA key consisting of multiple attributes.

Relational Integrity Constraints

  • Primary Key Constraint – Ensures uniqueness.
  • Foreign Key Constraint – Ensures referential integrity.
  • Not Null Constraint – Prevents null values.
  • Unique Constraint – Ensures uniqueness for non-primary key columns.
  • Check Constraint – Defines rules for column values.

Normalization in DBMS

Normalization in DBMS is the process of organizing data to reduce redundancy and improve data integrity.

Normal Forms

Normal FormDescription
1NF (First Normal Form)Removes duplicate columns; ensures atomicity.
2NF (Second Normal Form)Removes partial dependencies (if primary key is composite).
3NF (Third Normal Form)Removes transitive dependencies.
BCNF (Boyce-Codd Normal Form)Ensures no redundant dependencies.
4NF (Fourth Normal Form)Removes multi-valued dependencies.
5NF (Fifth Normal Form)Ensures lossless decomposition of tables.

Transactions and Concurrency Control

What is a Transaction?

A transaction is a sequence of database operations that must be executed as a single unit.

ACID Properties

PropertyDescription
AtomicityEnsures all operations are completed or none at all.
ConsistencyEnsures database integrity after the transaction.
IsolationEnsures transactions execute independently.
DurabilityEnsures completed transactions persist even after failures.

Concurrency Control Techniques

  • Lock-Based Protocols – Shared & Exclusive Locks.
  • Timestamp Ordering – Transactions ordered by timestamps.
  • Optimistic Concurrency Control – Validation phase before commit.

Indexing in DBMS

Indexes improve query performance by reducing search time.

Types of Indexes

TypeDescription
Primary IndexAutomatically created for the primary key.
Secondary IndexCreated for non-primary key attributes.
Clustered IndexDetermines the physical order of data.
Non-Clustered IndexCreates a separate structure for quick lookups.
Hash IndexUses hashing for direct access.

SQL Cheat Sheet

Data Definition Language (DDL)

CREATE TABLE students (
    id INT PRIMARY KEY,
    name VARCHAR(50),
    age INT NOT NULL
);

ALTER TABLE students ADD COLUMN email VARCHAR(100);

DROP TABLE students;

Data Manipulation Language (DML)

INSERT INTO students (id, name, age) VALUES (1'John', 22);

UPDATE students SET age = 23 WHERE id = 1;

DELETE FROM students WHERE id = 1;

Data Query Language (DQL)

SELECTFROM students WHERE age > 20;

Data Control Language (DCL)

GRANT SELECTINSERT ON students TO user1;

REVOKE INSERT ON students FROM user1;

Transaction Control Language (TCL)

BEGIN TRANSACTION;
UPDATE students SET age = 24 WHERE id = 2;
COMMIT;

ROLLBACK;

Learn more with these related lessons: DML and DDL in SQL & SQL Interview Questions

DBMS Interview Cheat Sheet

Common Interview Questions

Q1. What is the difference between DBMS and RDBMS?

Ans: RDBMS stores data in tables with relationships, while DBMS may use various structures.

Q2. What are the differences between SQL and NoSQL?

Ans: SQL uses structured tables, while NoSQL supports flexible document-based storage.

Q3. Explain normalization and denormalization.

Ans: Normalization removes redundancy; denormalization increases performance by allowing duplicates.

Q4. What is indexing, and why is it used?

Ans: Indexing speeds up data retrieval by reducing search operations.

Q5. What are ACID properties in DBMS?

Ans: Atomicity, Consistency, Isolation, and Durability ensure reliable transactions.

Cheat Sheet for DBMS - Quick Guide

TopicQuick Summary
NormalizationReduces redundancy and improves integrity.
ACID PropertiesEnsure reliable transactions.
IndexesImprove search speed.
SQL CommandsDDL, DML, DQL, DCL, TCL.
Joins in SQLINNER, LEFT, RIGHT, FULL OUTER.
LocksPrevent data conflicts in concurrent transactions.

Conclusion

This DBMS cheat sheet for interviews provides a structured quick reference guide covering core DBMS concepts, SQL commands, normalization, transactions, indexing, and interview FAQs. Mastering these topics will help you ace your DBMS interviews and efficiently work with databases in real-world applications.

More Cheat Sheets and Top Picks

  • Official Address
  • 4th floor, 133/2, Janardhan Towers, Residency Road, Bengaluru, Karnataka, 560025
  • Communication Address
  • Follow Us
  • facebookinstagramlinkedintwitteryoutubetelegram

© 2025 AlmaBetter