Any2Quiz
CBSE / 12 / Computer Science / Database Management

Databases and SQL Quiz - CBSE Class 12 Computer Science

Free practice quiz: Databases and SQL (CBSE Class 12 Computer Science). 16 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

Play all 16 questions free

Sample questions

  1. Which SQL command is used to retrieve data from a database?

    1. SELECT
    2. INSERT
    3. UPDATE
    4. DELETE
    Show answer

    Answer: A. SELECT

    The SELECT statement is used to query data from a database. INSERT adds data, UPDATE modifies data, and DELETE removes data.

  2. Explain the difference between INNER JOIN and LEFT JOIN in SQL.

    1. INNER JOIN returns all rows from both tables, LEFT JOIN only returns matching rows.
    2. INNER JOIN returns only matching rows, LEFT JOIN returns all rows from the left table and matching rows from the right.
    3. INNER JOIN returns all rows from the right table, LEFT JOIN returns all rows from the left table.
    4. There is no difference between INNER JOIN and LEFT JOIN.
    Show answer

    Answer: B. INNER JOIN returns only matching rows, LEFT JOIN returns all rows from the left table and matching rows from the right.

    INNER JOIN only includes rows where there is a match in both tables. LEFT JOIN includes all rows from the left table, even if there's no match in the right table.

  3. What is a relational database management system (RDBMS)?

    1. A system for managing data stored in flat files.
    2. A system for managing data stored in a network model.
    3. A system for managing data stored in a hierarchical model.
    4. A system for managing data stored in relations (tables).
    Show answer

    Answer: D. A system for managing data stored in relations (tables).

    RDBMS organizes data into tables with rows and columns, establishing relationships between tables for efficient data management and retrieval.

  4. Explain the concept of ACID properties in database transactions.

    1. Atomicity, Consistency, Isolation, Durability
    2. Accuracy, Consistency, Integrity, Dependability
    3. Atomicity, Coherency, Isolation, Durability
    4. Accuracy, Coherency, Integrity, Dependability
    Show answer

    Answer: A. Atomicity, Consistency, Isolation, Durability

    ACID properties (Atomicity, Consistency, Isolation, Durability) ensure reliable database transactions. Atomicity means all or nothing; Consistency maintains data integrity; Isolation prevents interference; Durability ensures data persistence.

  5. What is the purpose of the WHERE clause in an SQL SELECT statement?

    1. To specify the columns to be retrieved
    2. To sort the results
    3. To filter the rows based on a condition
    4. To group the rows
    Show answer

    Answer: C. To filter the rows based on a condition

    The WHERE clause is used to filter the rows in a SQL SELECT statement, returning only the rows that satisfy a specified condition.

Take the full quiz

Browse all Database Management quizzes