0% found this document useful (0 votes)
4 views6 pages

mcqdbms

The document contains a series of questions and answers related to databases, covering topics such as definitions, attributes, operations, and SQL constraints. It is structured into easy, medium, hard, and very hard levels, with explanations provided for each answer. The questions test knowledge on database concepts, including entity relationships, attributes, and the relational model.

Uploaded by

Ujjawala Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views6 pages

mcqdbms

The document contains a series of questions and answers related to databases, covering topics such as definitions, attributes, operations, and SQL constraints. It is structured into easy, medium, hard, and very hard levels, with explanations provided for each answer. The questions test knowledge on database concepts, including entity relationships, attributes, and the relational model.

Uploaded by

Ujjawala Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Easy Level Questions

1. What is a database?
a) A collection of unrelated data
b) A collection of related data
c) A single file containing data
d) A programming language
Answer: b) A collection of related data
Explanation: A database is a collection of related data that
represents some aspect of the real world.

2. Which of the following is NOT a property of a database?


a) It represents some aspect of the real world.
b) It is a random assortment of data.
c) It is designed for a specific purpose.
d) It has an intended group of users.
Answer: b) It is a random assortment of data.
Explanation: A database is a logically coherent collection of data,
not a random assortment.

3. What does DBMS stand for?


a) Data Base Management System
b) Data Binary Management System
c) Data Backup Management System
d) Data Block Management System
Answer: a) Data Base Management System
Explanation: DBMS stands for Database Management System,
which is a software system that facilitates the creation,
maintenance, and use of databases.

4. Which of the following is a key attribute in the EMPLOYEE


entity?
a) Name
b) Age
c) SSN (Social Security Number)
d) Address
Answer: c) SSN (Social Security Number)
Explanation: A key attribute uniquely identifies each entity in an
entity set. In the EMPLOYEE entity, SSN is the key attribute.

5. What is the purpose of the SELECT operation in relational


algebra?
a) To choose a subset of tuples from a relation based on a condition
b) To combine two relations
c) To delete tuples from a relation
d) To update tuples in a relation
Answer: a) To choose a subset of tuples from a relation based on a
condition
Explanation: The SELECT operation is used to filter tuples from a
relation based on a specified condition.

Medium Level Questions

6. Which of the following is an example of a composite


attribute?
a) Age
b) Name
c) Address (which can be divided into Street, City, State, Zip)
d) Salary
Answer: c) Address (which can be divided into Street, City, State,
Zip)
Explanation: A composite attribute can be divided into smaller
subparts, such as Address being divided into Street, City, State, and
Zip.

7. What is the degree of a relationship type?


a) The number of attributes in the relationship
b) The number of entity types participating in the relationship
c) The number of tuples in the relationship
d) The number of constraints in the relationship
Answer: b) The number of entity types participating in the
relationship
Explanation: The degree of a relationship type is the number of
entity types that participate in the relationship.

8. Which of the following is a characteristic of the database


approach?
a) Data redundancy
b) Program-data independence
c) Data inconsistency
d) Data duplication
Answer: b) Program-data independence
Explanation: One of the main characteristics of the database
approach is program-data independence, which allows changes to
the data structure without affecting the application programs.

9. What is the purpose of the FOREIGN KEY constraint in SQL?


a) To ensure that each value in a column is unique
b) To link two tables together based on a common attribute
c) To enforce domain constraints
d) To restrict the number of rows in a table
Answer: b) To link two tables together based on a common
attribute
Explanation: A FOREIGN KEY constraint is used to enforce
referential integrity between two tables by linking them based on a
common attribute.

10. Which of the following is a multivalued attribute?


a) Age
b) Phone numbers (a person can have multiple phone numbers)
c) Salary
d) Date of Birth
Answer: b) Phone numbers (a person can have multiple phone
numbers)
Explanation: A multivalued attribute can have multiple values for a
single entity, such as a person having multiple phone numbers.

Hard Level Questions

11. Which of the following is true about weak entity types?


a) They have a key attribute of their own.
b) They do not have a key attribute and depend on another entity
for identification.
c) They cannot participate in relationships.
d) They are always independent of other entities.
Answer: b) They do not have a key attribute and depend on
another entity for identification.
Explanation: Weak entity types do not have a key attribute of their
own and depend on a strong entity (owner entity) for identification.

12. What is the difference between a natural join and an


equijoin?
a) A natural join eliminates duplicate attributes, while an equijoin
does not.
b) A natural join requires a join condition, while an equijoin does not.
c) A natural join is a type of outer join, while an equijoin is a type of
inner join.
d) A natural join can only be performed on two tables, while an
equijoin can be performed on multiple tables.
Answer: a) A natural join eliminates duplicate attributes, while an
equijoin does not.
Explanation: A natural join automatically eliminates duplicate
attributes, whereas an equijoin retains them.

13. Which of the following is a recursive relationship?


a) EMPLOYEE manages DEPARTMENT
b) EMPLOYEE supervises EMPLOYEE
c) STUDENT enrolls in COURSE
d) PROJECT is controlled by DEPARTMENT
Answer: b) EMPLOYEE supervises EMPLOYEE
Explanation: A recursive relationship is one where the same entity
type participates more than once in different roles, such as an
EMPLOYEE supervising another EMPLOYEE.

14. What is the purpose of the DIVISION operation in


relational algebra?
a) To retrieve tuples that satisfy a specific condition
b) To combine two relations based on a common attribute
c) To retrieve tuples that are related to all tuples in another relation
d) To delete tuples from a relation
Answer: c) To retrieve tuples that are related to all tuples in
another relation
Explanation: The DIVISION operation is used to retrieve tuples
from one relation that are related to all tuples in another relation.

15. Which of the following is true about the three-schema


architecture?
a) The internal schema describes the physical storage structure of
the database.
b) The conceptual schema describes the user views of the database.
c) The external schema describes the structure of the whole
database.
d) The internal schema is the same as the external schema.
Answer: a) The internal schema describes the physical storage
structure of the database.
Explanation: The three-schema architecture consists of the
internal schema (physical storage), conceptual schema (logical
structure), and external schema (user views).

Very Hard Level Questions

16. Which of the following is a correct representation of a


ternary relationship in an ER diagram?
a) A diamond connected to three rectangles
b) A diamond connected to two rectangles
c) A rectangle connected to three diamonds
d) A rectangle connected to two diamonds
Answer: a) A diamond connected to three rectangles
Explanation: A ternary relationship is represented in an ER
diagram as a diamond connected to three rectangles, each
representing an entity type.

17. What is the difference between total and partial


participation in a relationship?
a) Total participation means every entity must participate in the
relationship, while partial participation means only some entities
participate.
b) Total participation means only some entities participate, while
partial participation means every entity must participate.
c) Total participation is optional, while partial participation is
mandatory.
d) Total participation and partial participation are the same.
Answer: a) Total participation means every entity must participate
in the relationship, while partial participation means only some
entities participate.
Explanation: Total participation means every entity in the entity
set must participate in the relationship, whereas partial participation
means only some entities participate.

18. Which of the following is a correct SQL statement to


create a table with a foreign key constraint?
a) CREATE TABLE EMPLOYEE (EmpID INT PRIMARY KEY, DeptID INT FOREIGN
KEY REFERENCES DEPARTMENT(DeptID));
b) CREATE TABLE EMPLOYEE (EmpID INT PRIMARY KEY, DeptID INT
REFERENCES DEPARTMENT(DeptID));
c) CREATE TABLE EMPLOYEE (EmpID INT PRIMARY KEY, DeptID INT FOREIGN
KEY (DeptID) REFERENCES DEPARTMENT);
d) CREATE TABLE EMPLOYEE (EmpID INT PRIMARY KEY, DeptID INT FOREIGN
KEY REFERENCES DEPARTMENT);
Answer: b) CREATE TABLE EMPLOYEE (EmpID INT PRIMARY KEY, DeptID INT
REFERENCES DEPARTMENT(DeptID));
Explanation: The correct syntax for creating a table with a foreign
key constraint is to use the REFERENCES keyword followed by the
referenced table and column.

19. What is the purpose of the CASCADE option in a foreign


key constraint?
a) To reject the update or delete operation if it violates the
constraint
b) To automatically update or delete the referencing rows when the
referenced row is updated or deleted
c) To set the referencing column to NULL when the referenced row
is deleted
d) To prevent any changes to the referenced table
Answer: b) To automatically update or delete the referencing rows
when the referenced row is updated or deleted
Explanation: The CASCADE option ensures that any changes
(updates or deletes) in the referenced table are automatically
propagated to the referencing table.

20. Which of the following is true about the relational


model?
a) It represents data as a collection of tables.
b) It represents data as a hierarchical tree structure.
c) It represents data as a network of nodes and edges.
d) It represents data as a graph.
Answer: a) It represents data as a collection of tables.
Explanation: The relational model represents data as a collection
of tables (relations), where each table consists of rows (tuples) and
columns (attributes).

You might also like