Any2Quiz
Quizzes / CBSE / Class 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.

This CBSE Class 12 Computer Science practice quiz has 16 multiple-choice questions on Databases and SQL, and 16 of them come with an explanation. Try the 5 sample questions below (tap an option to check yourself), then play the full quiz online. No sign-up needed.

Start quiz: 16 questions, free

Sample questions

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

    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.

    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)?

    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.

    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?

    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

More questions in this quiz

Answers and explanations are in the full quiz.

  1. What does SQL stand for?
  2. What is a primary key in a relational database?
  3. How would you retrieve all rows from a table named 'Customers' where the 'Country' column is 'USA'?
  4. Write an SQL query to create a table named 'Products' with columns 'ProductID' (INT, primary key), 'ProductName' (VARCHAR(50)), and 'Price' (DECIMAL(10,2)).
  5. Describe the use of 'GROUP BY' clause in SQL.
  6. What is a transaction in the context of a database?
  7. Consider two tables, 'Orders' and 'Customers', with a common column 'CustomerID'. Write an SQL query to retrieve the order details along with customer information using an appropriate JOIN.
  8. What is a database index, and how does it improve query performance?
  9. What is normalization in database design, and why is it important?
  10. Explain the difference between DELETE and TRUNCATE commands in SQL.
  11. How can you ensure data consistency in a database system?

Browse all Database Management quizzes

More to play

Daily ChallengeA new quiz every day. Keep your streak.HangmanGuess the word, letter by letter.Story QuestLearn through short interactive stories.All quizzesCBSE, ICSE, competitive exams and more.