50 DBMS MCQs with Answers

Last Updated :
Discuss
Comments

Question 1

Consider the following transactions with data items P and Q initialized to zero:

T1: read (P) ;
read (Q) ;
if P = 0 then Q : = Q + 1 ;
write (Q) ;
T2: read (Q) ;
read (P) ;
if Q = 0 then P : = P + 1 ;
write (P) ;

Any non-serial interleaving of T1 and T2 for concurrent execution leads to

  • A

    A serializable schedule

  • B

    A schedule that is not conflict serializable

  • C

    A conflict serializable schedule

  • D

    A schedule for which a precedence graph cannot be drawn

Question 2

Table A:

Screenshot-2026-02-24-153509

Table B:

Screenshot-2026-02-24-153536

Table C:

Screenshot-2026-02-24-153933

Consider the above tables A, B and C. How many tuples does the result of the following SQL query contains?

SELECT A.id 
FROM   A 
WHERE  A.age > ALL (SELECT B.age 
                    FROM   B 
                    WHERE  B. name = "arun") 
  • A

    4

  • B

    3

  • C

    0

  • D

    1

Question 3

Database table by name Loan_Records is given below.

Screenshot-2026-02-24-161349

What is the output of the following SQL query?

SELECT Count(*) 
FROM  ( ( SELECT Borrower, Bank_Manager 
          FROM Loan_Records) AS S 
          NATURAL JOIN ( SELECT Bank_Manager, Loan_Amount 
                         FROM Loan_Records) AS T );
  • A

    3

  • B

    9

  • C

    5

  • D

    6

Question 4

Consider the following relational schema: 
 

Suppliers(sid:integer, sname:string, city:string, street:string)
Parts(pid:integer, pname:string, color:string)
Catalog(sid:integer, pid:integer, cost:real)


Consider the following relational query on the above database: 
 

SELECT S.sname
FROM Suppliers S
WHERE S.sid NOT IN (SELECT C.sid
FROM Catalog C
WHERE C.pid NOT IN (SELECT P.pid
FROM Parts P
WHERE P.color<> 'blue'))


Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?
 

  • A

    Find the names of all suppliers who have supplied a non-blue part.
     

  • B

    Find the names of all suppliers who have not supplied a non-blue part.
     

  • C

    Find the names of all suppliers who have supplied only blue parts.
     

  • D

    Find the names of all suppliers who have not supplied only blue parts.
     

Question 5

Let R1 (a, b, c) and R2 (x, y, z) be two relations in which a is the foreign key of R1 that refers to the primary key of R2 . Consider following four options. (a)Insert into R 1 (b)Insert into R 2 (c)Delete from R 1 (d)Delete from R 2 Which of the following is correct about the referential integrity constraint with respect to above?

  • A
    Operations (a) and (b) will cause violation.
  • B
    Operations (b) and (c) will cause violation.
  • C
    Operations (c) and (d) will cause violation.
  • D
    Operations (d) and (a) will cause violation.

Question 6

How to express that some person keeps animals as pets?

  • A
    (A)
  • B
    (B)
  • C
    (C)
  • D
    (D)

Question 7

A view of database that appears to an application program is known as

  • A

    Schema

  • B

    Subschema

  • C

    Virtual table

  • D

    Index Table

Question 8

Which operation is used to extract specified columns from a table?

  • A

    Project

  • B

    Join

  • C

    Extract

  • D

    Substitute

Question 9

The relation schemas R1 and R2 form a Lossless join decomposition of R if and only if: (a) R1 ∩ R2 β†  (R1 - R2) (b) R1 β†’ R2 (c) R1 ∩ R2 β†  (R2 - R1 ) (d)(R2 β†’ R1) ∩ R2

  • A
    (a) and (b) happens
  • B
    (a) and (d) happens
  • C
    (a) and (c) happens
  • D
    (b) and (c) happens

Question 10

In functional dependency Armstrong inference rules refers to

  • A

    Reflexivity, Augmentation and Decomposition

  • B

    Transitivity, Augmentation and Reflexivity

  • C

    Augmentation, Transitivity, Reflexivity and Decomposition

  • D

    Reflexivity, Transitivity and Decomposition

There are 50 questions to complete.

Take a part in the ongoing discussion