Suresh.AI
SubjectsNotes
InterviewMCQsRoadmapsProjectsAI ChatBlog

Platform

  • Subjects
  • Notes
  • MCQs
  • Interview Prep
  • Roadmaps
  • Projects

AI Features

  • AI Tutor
  • AI Quiz Generator
  • AI Interviewer
  • AI Code Review
  • AI Flashcards
  • AI Mind Maps

Resources

  • Blog
  • PYQs
  • Code Playground
  • Search
  • AI Chat

Account

  • Dashboard
  • Sign In
Suresh.AI

© 2026 Suresh.AI. All rights reserved.

Back to Notes
DBMS
SQL
normalization
transactions

DBMS Interview Questions & Answers

Most frequently asked DBMS interview questions with detailed explanations.

Ananya Gupta 20 min Study Material

DBMS Interview Questions

Q1: What is the difference between DBMS and RDBMS?

**DBMS** (Database Management System) stores data as files. **RDBMS** (Relational DBMS) stores data in tables with relationships.

| Feature | DBMS | RDBMS |

|---------|------|-------|

| Data Storage | File-based | Table-based | | Relationships | No | Yes (Foreign Keys) | | Normalization | Not supported | Supported | | ACID | Partial | Full | | Example | MongoDB | PostgreSQL |

Q2: Explain the ACID properties.

**Atomicity**: Transaction is all-or-nothing. If any part fails, the entire transaction rolls back.

**Consistency**: Transaction brings database from one valid state to another. All constraints and rules are maintained.

**Isolation**: Concurrent transactions don't interfere with each other. Each transaction appears to run in isolation.

**Durability**: Once committed, changes persist even after system failure.


Q3: What is normalization? Explain normal forms.

Normalization is the process of organizing data to eliminate redundancy and anomalies.

**1NF**: Atomic columns, no repeating groups

**2NF**: 1NF + no partial dependencies

**3NF**: 2NF + no transitive dependencies

**BCNF**: Every determinant is a candidate key

**4NF**: No multi-valued dependencies

**Example**:

Before normalization: Student(ID, Name, Courses)

After 3NF: Student(ID, Name), Enrollment(ID, CourseID), Course(CourseID, Name)


Q4: What is indexing? Types of indexes?

Indexing is a technique to speed up data retrieval operations.

**Types**:

  • **Primary Index**: On primary key (clustered)
  • **Secondary Index**: On non-primary key (non-clustered)
  • **Unique Index**: Ensures unique values
  • **Composite Index**: On multiple columns
  • **Hash Index**: For equality searches
  • **B-Tree Index**: For range queries

  • Q5: Explain SQL Joins.

    **INNER JOIN**: Returns matching rows from both tables

    **LEFT JOIN**: All rows from left, matching from right

    **RIGHT JOIN**: All rows from right, matching from left

    **FULL OUTER JOIN**: All rows from both tables

    **CROSS JOIN**: Cartesian product

    **SELF JOIN**: Table joined with itself


    Q6: What is a transaction and its states?

    A transaction is a logical unit of work that contains one or more SQL statements.

    **States**: Active → Partially Committed → Committed

    → Failed → Aborted


    Q7: Difference between DELETE, TRUNCATE, and DROP?

    | Command | Type | Speed | Rollback | Structure |

    |---------|------|-------|----------|-----------|

    | DELETE | DML | Slow | Yes | Preserved | | TRUNCATE | DDL | Fast | No | Preserved | | DROP | DDL | Fastest | No | Removed |

    Q8: What is a deadlock in databases?

    A deadlock occurs when two or more transactions hold locks on resources that each other needs, causing them to wait indefinitely.

    **Solutions**:

  • **Deadlock Prevention**: Resource ordering
  • **Deadlock Detection**: Wait-for graph
  • **Deadlock Avoidance**: Wound-wait, wait-die
  • **Timeout**: Rollback after timeout