20 DBMS MCQ Questions and Answer

  1. A collection of interrelated records is called a a) Database
    b) Spreadsheet
    c) Management information system
    d) Text file
    e) None of these
  2. In a database, related fields are grouped to a) File
    b) Bank
    c) Menu
    d) Data record
    e) None of these
  3. Which of the following refers to the level of data abstraction that describes exactly how the data actually stored? a) Conceptual Level
    b) Physical Level
    c) File Level
    d) Logical Level
    e) None of these
  4. Which one is the guideline of Referential integrity in a relationship?

a) Do not enter a value in the primary key field of child table if that value does not exist in the primary key of the parent table
b) Do not enter a value in the foreign key field of a parent table if that value does not exist in the primary key of the child table
c) Do not enter a value in the foreign key field of a child table if that value does not exist in the primary key of the parent table.
d) Do not enter a value in the foreign key field of child table if that value does not exist in the foreign key of the parent table
e) None of these

  1. In SQL the statement select*from R,S is equivalent to a) Select * from R natural join S
    b) Select * from R cross join S
    c) Select * from R union join S
    d) Select * from R inner join S
    e) None of these
  2. In tuple relational calculus P1 → P2 is equivalent to a) ¬P1 ∧P2
    b) ¬P1 ∨ P2
    c) P1 ∧ P2
    d) P1 ∧ ¬P2
    e) None of these
  3. Using Relational Algebra the query that finds customers, who have a balance of over 1000 is a) Π Customer_name(σ balance >1000(Deposit))
    b) σ Customer_name(Π balance >1000(Deposit))
    c) Π Customer_name(σ balance >1000(Borrow))
    d) σ Customer_name(Π balance >1000(Borrow))
    e) None of these
  4. Consider the join of a relation R with relation S. If R has m tuples and S has n tuples, then the maximum size of join is:
    a) Mn
    b) m+n
    c) (m+n)/2
    d) 2(m+n)
    e) None of these
  5. Because of the calculus expression, the relational calculus is considered as a) procedural language
    b) non procedural language
    c) structural language
    d) functional language
    e) None of these
  6. Consider two tuples X and Y, the operation whose result includes tuples that are only in X but not in Y is classified as a) square of relation X and Y
    b) union of relation X and Y
    c) intersection of relation X and Y
    d) difference of relation X and Y
    e) None of these
  7. In relational operations, the SELECT operation is written as a) Σ < selection condition > ( S )
    b) σ < selection condition > ( R )
    c) ω < selection condition > ( R )
    d) Ω < selection condition > ( R )
    e) None of these
  8. Find the ID, name, dept name, salary for instructors whose salary is greater than $80,000 . a) {t | t ε instructor ∧ t[salary] > 80000}
    b) Э t ∈ r (Q(t))
    c) {t | Э s ε instructor (t[ID] = s[ID]∧ s[salary] > 80000)}
    d) {t | t ε instructor ∧ t[salary] <80000}
    e) None of these Answer: (a).
  9. Database table by name Loan_Records is given below.
    Borrower Bank_Manager Loan_Amount
    Ramesh Sunderajan 10000.00
    Suresh Ramgopal 5000.00
    Mahesh Sunderajan 7000.00
    What is the output of the following SQL query?

SELECT Count(*)
FROM ( (SELECT Borrower, Bank_Manager
FROM Loan_Records) AS S
FROM Loan_Records) AS T );

a) 3
b) 9
c) 5
d) 6
e) None of these

  1. A relational schema for a train reservation database is given below. Passenger (pid, pname, age) Reservation (pid, class, tid)

Table: Passenger

pid pname age

0 Sachin 65
1 Rahul 66
2 Sourav 67
3 Anil 69

Table : Reservation

pid class tid

0 AC 8200
1 AC 8201
2 SC 8201
5 AC 8203
1 SC 8204
3 AC 8202
What pids are returned by the following SQL query for the above instance of the tables?
FROM Reservation ,
WHERE class ‘AC’ AND
FROM Passenger
WHERE age > 65 AND
Passenger. pid = Reservation.pid)

a)1, 0
b)1, 2
c)1, 3
d)1, 5
e)None of these

  1. The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list?
    select title
    from book as B
    where (select count(*)
    from book as T
    where T.price > B.price) < 5 a)Titles of the four most expensive books
    b)Title of the fifth most inexpensive book
    c)Title of the fifth most expensive bookTitles of the five most expensive books
    d)Titles of the five most expensive books
    e)None of these
  2. The relation scheme Student Performance (name, courseNo, rollNo, grade) has the following functional dependencies:
    name, courseNo → grade
    rollNo, courseNo → grade
    name → rollNo
    rollNo → name
    The highest normal form of this relation scheme is a)2 NF
    b)3 NF
    e)None of these
  3. A table has fields Fl, F2, F3, F4, F5 with the following functional dependencies F1 → F3 F2→ F4
    (F1 . F2) → F5 In terms of Normalization, this table is in a)1 NF
    b) NF
    c)3 NF
    d)4 NF
    e)None of these Answer: (a).
  4. Which one of the following is NOT a part of the ACID properties of database transactions? a)Atomicity
    e)None of the these
  5. Which of the constraint can be enforced one per table? a)Primary key constraint
    b)Not Null constraint
    c)Foreign Key constraint
    d)Check constraint
    e)None of these
  6. CREATE TABLE course
    ( . . .
    FOREIGN KEY (dept name) REFERENCES department
    . . . );
    The following code is used. a)Delete
    b)delete tuple
    c)delete cascade
    e)None of these

Answer keys-

  1. Answer: (a)
  2. Answer: (d)
  3. Answer: (b)
  4. Answer: (c)
  5. Answer: (b)
  6. Answer: (b)
  7. Answer: (a)
  8. Answer: (a)
  9. Answer: (b)
  10. Answer: (d)
  11. Answer: (b)
  12. Answer: (a)
  13. Answer: (c)
  14. Answer: (c)
  15. Answer: (d)
  16. Answer: (b)
  17. Answer: (a)
  18. Answer: (d)
  19. Answer: (a)
  20. Answer: (c)

Leave a Comment