DBMS MCQ Questions and Answer Set-1

1) Determine the highest possible normal form of the given relation: A –>BCDEF, BC –> ADEF, B –>F


a) 1NF
b) 2 NF
c) 3NF
d) BCNF

ANS: A

2) How many types of Indexes are there in SQL Server?

a) 1
b) 2
c) 3
d) 4

ANS: B

3) What is the default size of n in a column which is defined as VARCHAR(n)?

a) NULL
b) 0
c) 1
d) None of the above

ANS: C

4) How can we get all records (redundant as well as non-redundant) from the union operator?

a) Using ‘ALL’ operator with UNION.
b) Using ‘Distinct’ operator with UNION.
c) We get all records (redundant as well as non-redundant) with UNION operator by default.
d) None of the above.

ANS: A

5) What is not true about truncate?

a) Truncate delete the record from the table
b) Truncate fires trigger after deleting the record
c) Truncate is used to delete a record
d) It runs trigger after deletion

ANS: D

6) Which key accepts multiple NULL values?

a) Foreign Key
b) Unique Key
c) Primary Key
d) None of the above

ANS: A

7) A subquery can itself include one or more subqueries. ………….. subqueries can be nested in a statement.

A) 16
B) 32
C) 64
D) Any number of

ANS: D

8) In the case of correlated subquery, the outer query is executed once. The subquery is executed …………. for every row in the outer query.

A) Once
B) Twice
C) Thrice
D) Both A & B

ANS: A

9) Anomalies are avoided by splitting the offending relation into multiple relations, is also known as ………………..

A) Acupressure
B) Decomposition
C) Precomposition
D) Both b & c
ANS: B

10) A …… is an indirect functional dependency, one in which X→Z only by virtue of X→Y and Y→Z.

A) multivalued dependencies
B) join dependency
C) trivial functional dependency
D) transitive dependencies

ANS: D

11) Result of the below query is:

select ‘Potato ‘ || NULL= NULL || ‘Chips’ from dual
A) Potato Chips
B) Potato NULL= NULL Chips
C) NULL
D) Error

ANS: D

12) List all orders, showing order number, customer name and credit limit of a customer.

Orders Table:
Order_Number, Customer, Product_Amount

Customers Table:
Customer_Number, Customer_Name, Credit_Limit

Which of the below query satisfy the above question:

A)Select Order_Numer, Customer_Name, Credit_Limit
from Customers, Orders
where Customer = Customer_Number

B)Select Order_Numer, Customer_Name, Credit_Limit
from Customers INNER JOIN Orders
ON Customers.Customer_Number = Orders.Customer;

C)Both
D)None

ANS: C

13) Which one of the below is an ANSI Syntax

A)SELECT table1.column, table2. column2 FROM table1, table2
WHERE tablel. columnl = table2. column2;

B)SELECT tablel.column, table2. column2
FROM table1 INNER JOIN table2
ON tablel. columnl = table2. column2;

C)Both
D)None

ANS: C

14) Which of the below point(s) are true with respect to joins:

A) Null values never join.
B) Columns used in the joins mush have compatible data types.
C) Join column is usually a primary key or foreign key.
D) Cross join without a WHERE clause returns a Cartesian product.
E) All of the above

ANS: E

15) Customers table
Custnbr, Company, Custrep, Creditlim
Orders table
Order_no, Cust, Prodt, Qty, Amt, Discount
Find all the customers with orders more than 500 or credit limits greater than or equal to 500.

A)Select distinct Custnbr
from Customers Right JOIN Orders on Custnbr = Cust
where (Creditlim >= 500 OR Amt > 500)
B)Select distinct Custnbr
from Customers LEFT JOIN Orders on Custnbr = Cust
where (Creditlim > 500 OR Amt >= 500)
C) Select Custnbr
from Customers LEFT JOIN Orders on Custnbr = Cust
where (Creditlim > 500 OR Amt > 500)
D)Select distinct Custnbr
from Customers LEFT JOIN Orders on Custnbr = Cust
where (Creditlim >= 500 OR Amt > 500)

ANS: D

Leave a Comment