All prep collections

Most Asked Database Topics

High-frequency database concepts and SQL queries that keep showing up across software house interviews — ranked by how often companies ask them.

31 Topics
53+ Companies
Most frequently asked
Updated Aug 2026

31 topics

  • 1

    Joins (types and queries)

    SQLJoinsMedium

    Explain the different types of SQL joins (inner, left, right, full outer, self join) and write queries that combine data from two or more tables based on related columns.

    Asked in 34 companies
    7 Vals
    BinaryBrix
    BrainX
    CQTechnologies
    Celestial Technology
    +29
  • 2

    Indexing (concept and query)

    PerformanceIndexesMedium

    What a database index is, how it speeds up data retrieval, and how to decide which column(s) to index.

    Asked in 30 companies
    7 Vals
    Algolix
    Arbisoft
    BrainX
    Celestial Technology
    +25
  • 3

    Normalization / Normal Forms

    DesignNormalizationMedium

    The process of organizing database tables to reduce redundancy and dependency, explained through the normal forms (1NF, 2NF, 3NF).

    Asked in 23 companies
    7 Vals
    Algolix
    Arbisoft
    Arrivy
    BrainX
    +18
  • 4

    GROUP BY / HAVING / WHERE clause

    SQLAggregationMedium

    How to filter and group query results — WHERE filters individual rows, GROUP BY groups rows sharing a value, and HAVING filters those grouped results.

    Asked in 18 companies
    7 Vals
    BrainX
    Cogent Labs
    CureMD
    Devsinc
    +13
  • 5

    Stored Procedures

    SQLProceduresMedium

    Precompiled SQL code stored in the database that can be executed repeatedly — why they're used and how they differ from plain queries in terms of efficiency.

    Asked in 14 companies
    7 Vals
    BrainX
    Esketchers
    Foomotion
    NETSOL
    +9
  • 6

    Database schema/ERD design

    DesignERDMedium

    Designing the structure of a database — drawing an Entity-Relationship Diagram (ERD) to represent entities, attributes, and relationships, then translating it into actual tables.

    Asked in 13 companies
    Arrivy
    BrainX
    Devsinc
    Esketchers
    PakWheels
    +8
  • 7

    Triggers

    SQLTriggersMedium

    Database objects that automatically execute a specified action in response to certain events (insert, update, delete) on a table.

    Asked in 12 companies
    Devsinc
    Esketchers
    Foomotion
    NETSOL
    Rolustech
    +7
  • 8

    Primary Key vs Foreign Key vs Unique Key

    KeysConstraintsEasy

    The different types of keys used to uniquely identify records and maintain relationships between tables.

    Asked in 12 companies
    7 Vals
    BrainX
    CureMD
    Esketchers
    Qbatch
    +7
  • 9

    Views

    SQLViewsEasy

    Virtual tables created from the result of a stored query, used to simplify complex queries or restrict data access.

    Asked in 11 companies
    BrainX
    Devsinc
    Esketchers
    Rolustech
    Tech Clan
    +6
  • 10

    Nth highest/lowest salary query

    SQLQueriesMedium

    A classic practical SQL task: write a query to find the 2nd, 3rd, or Nth highest (or lowest) salary from an employee/salary table.

    Asked in 10 companies
    CureMD
    Devsinc
    Mezino technology
    NETSOL
    Qbatch
    +5
  • 11

    ACID properties / Transactions

    TransactionsMedium

    The four properties (Atomicity, Consistency, Isolation, Durability) that guarantee reliable processing of database transactions.

    Asked in 9 companies
    Arrivy
    BrainX
    Devsinc
    Technosoft
    Tintash
    +4
  • 12

    Many-to-many relationship

    DesignRelationshipsMedium

    How to represent and implement a relationship where multiple records in one table relate to multiple records in another, typically using a junction/bridge table.

    Asked in 8 companies
    BrainX
    Codefulcrum
    NETSOL
    Qbatch
    SSI
    +3
  • 13

    Denormalization

    DesignPerformanceMedium

    The process of intentionally introducing redundancy into a normalized database to improve read performance.

    Asked in 7 companies
    7 Vals
    Arbisoft
    Esketchers
    Smaritan Technologies
    Tech Clan
    +2
  • 14

    Subqueries / Nested queries

    SQLQueriesMedium

    A query written inside another query, used to filter or compute values needed by the outer query.

    Asked in 5 companies
    7 Vals
    Devsinc
    Rolustech
    Sapphire
    i2c
  • 15

    SQL vs NoSQL

    ConceptsEasy

    Comparing relational (SQL) databases with structured schemas against non-relational (NoSQL) databases with flexible schemas, and when to use each.

    Asked in 4 companies
    BrainX
    PakWheels
    Tintash
    +1
  • 16

    Constraints (CHECK, UNIQUE, NOT NULL)

    ConstraintsEasy

    Rules applied to table columns to enforce data integrity, such as preventing null values or duplicate entries.

    Asked in 5 companies
    CQTechnologies
    Devsinc
    Educative
    Technosoft
    i2c
  • 17

    Database locking / concurrency control

    ConcurrencyHard

    Mechanisms used to manage simultaneous access to data by multiple transactions, preventing conflicts or data corruption.

    Asked in 5 companies
    Celestial Technology
    PakWheels
    Rolustech
    i2c
    +1
  • 18

    Query optimization / performance

    PerformanceHard

    Techniques for making a query run faster, especially on large datasets with many joins, subqueries, or indexes.

    Asked in 4 companies
    Esketchers
    NETSOL
    Technosoft
    +1
  • 19

    Aggregate functions (COUNT, SUM, AVG etc.)

    SQLAggregationEasy

    Built-in SQL functions that perform a calculation on a set of values and return a single summary value.

    Asked in 4 companies
    BrainX
    Focusteck
    NETSOL
    Qbatch
  • 20

    Bridge/junction table

    DesignRelationshipsMedium

    An intermediary table used to implement a many-to-many relationship between two other tables.

    Asked in 4 companies
    Devsinc
    Qbatch
    SSI
    Tintash
  • 21

    DROP vs DELETE vs TRUNCATE

    SQLEasy

    The differences between these three commands for removing data or structures — DROP removes the whole table, DELETE removes specific rows, and TRUNCATE removes all rows quickly without logging individually.

    Asked in 3 companies
    Devsinc
    Sapphire
    i2c
  • 22

    Self join

    SQLJoinsMedium

    A join where a table is joined with itself, typically used to compare rows within the same table.

    Asked in 3 companies
    BrainX
    Qbatch
    i2c
  • 23

    SQL Injection

    SecurityMedium

    A security vulnerability where malicious SQL code is inserted into a query through unsanitized user input.

    Asked in 3 companies
    Esketchers
    +2
  • 24

    DDL vs DML vs DCL

    ConceptsEasy

    The three categories of SQL commands — Data Definition Language (structure), Data Manipulation Language (data), and Data Control Language (permissions).

    Asked in 3 companies
    Esketchers
    Tintash
    i2c
  • 25

    One-to-one / one-to-many relationship

    DesignRelationshipsEasy

    How to model and implement relationships where one record relates to exactly one, or to multiple, records in another table.

    Asked in 3 companies
    BrainX
    Codefulcrum
    +1
  • 26

    Composite key

    KeysEasy

    A primary key made up of two or more columns combined to uniquely identify a row.

    Asked in 2 companies
    NETSOL
    Rolustech
  • 27

    Database anomalies

    DesignNormalizationMedium

    Inconsistencies that can occur in poorly designed databases during insert, update, or delete operations — a key motivation for normalization.

    Asked in 2 companies
    NETSOL
    Technosoft
  • 28

    Cascading delete/update

    ConstraintsMedium

    A foreign key behavior where deleting or updating a record automatically applies the same action to related records in other tables.

    Asked in 2 companies
    SSI
    i2c
  • 29

    Referential integrity

    ConstraintsEasy

    A rule ensuring that foreign key values always correspond to an existing primary key in the related table.

    Asked in 2 companies
    SSI
    i2c
  • 30

    OLTP vs OLAP

    ConceptsMedium

    Comparing Online Transaction Processing systems (fast, frequent small transactions) with Online Analytical Processing systems (complex analytical queries on large datasets).

    Asked in 1 companies
    i2c
  • 31

    Database backup/recovery

    OperationsEasy

    Strategies and methods for backing up a database and restoring it in case of data loss or failure.

    Asked in 1 companies
    Technosoft