Quiz Bank
Quiz Bank
2. How does a DBMS improve data security compared to traditional file systems?
a) By allowing unauthorized access
b) By implementing access control and authentication
c) By storing data in unstructured formats
d) By eliminating the need for backups
3. Which phase of database design involves gathering user requirements and
understanding data needs?
a) Conceptual Design
b) Logical Design
c) Requirements Collection and Analysis
d) Physical Design
4. During which phase is the Entity-Relationship (ER) model typically created?
a) Physical Design
b) Conceptual Design
c) Transaction Implementation
d) Requirements Collection
5. What is the purpose of the Physical Design phase in database development?
a) To determine how data will be stored and accessed efficiently
b) To define business rules for data relationships
c) To gather system requirements from stakeholders
d) To create conceptual schemas using high-level models
6. Which shape is used to represent a relationship in an ER diagram?
a) Rectangle
b) Oval
c) Diamond
d) Triangle
7. What is the first step in designing an ER diagram?
a) Identify relationships
b) Identify entities
c) Draw the final ER diagram
d) Define primary keys
8. What does cardinality define in an ER diagram?
a) The number of entities in the database
b) The attributes of an entity
c) The number of relationships between entities
d) The security level of the database
17.Which of the following best describes the difference between composite and
simple (atomic) attributes in an ER diagram?
18.a) Composite attributes can be divided into smaller sub-parts, whereas simple attributes
cannot be divided further.
b) Simple attributes can have multiple values, whereas composite attributes can have
only one value.
c) Composite attributes are always primary keys, while simple attributes are not.
d) Simple attributes must be derived, whereas composite attributes are stored directly in
the database.
19.Which of the following is an example of a derived attribute?
a) Date of Birth
b) Age
c) Employee ID
d) Phone Number
1. Why is selecting appropriate data types important when designing SQL tables?
A. It simplifies data entry only
B. It reduces storage space and improves performance
C. It is required for syntax validation only
D. It prevents data redundancy automatically
14. What will the relational algebra operation σ(CGPA > 8.0)(Student) do?
A. Select all attributes of students with CGPA greater than 8.0
B. Project the CGPA of all students
C. Remove students with CGPA less than 8.0
D. Sort students by CGPA
15. Which SQL aggregate function returns the number of rows matching a condition?
A. COUNT()
B. SUM()
C. AVG()
D. MAX()
16. What is the key difference between DELETE and TRUNCATE in SQL?
A. DELETE removes the structure, TRUNCATE doesn’t
B. DELETE is faster than TRUNCATE
C. TRUNCATE cannot be rolled back; DELETE can
D. DELETE works only on numeric fields
17. Which relational algebra operation is used to fetch specific attributes (columns) from
a relation?
A. σ (Selection)
B. π (Projection)
C. × (Cartesian Product)
D. ⨝ (Join)
18. What type of subquery is executed once for every row of the outer query?
A. Scalar subquery
B. Correlated subquery
C. Nested subquery
D. Uncorrelated subquery
19. Which SQL command is used to add a new column to an existing table?
A. ALTER TABLE ADD COLUMN
B. MODIFY TABLE ADD
C. ADD COLUMN TO TABLE
D. INSERT COLUMN
20. In relational algebra, which operation would combine EMPLOYEE and DEPARTMENT
tables using a common attribute DeptID?
A. Cartesian Product
B. Division
C. Natural Join
D. Selection
23. Which SQL clause is used to filter the result after GROUP BY?
A. WHERE
B. ORDER BY
C. HAVING
D. LIMIT
24. Which of the following is NOT a valid use case for subqueries?
A. Filtering rows
B. Creating new tables
C. Updating rows
D. Calculating aggregate values
25. What will happen if a subquery returns multiple rows in a context expecting a single row?
A. Executes normally
B. Throws an error
C. Ignores extra rows
D. Joins automatically
28. Which JOIN returns all combinations of rows from two tables?
A. INNER JOIN
B. LEFT JOIN
C. RIGHT JOIN
D. CROSS JOIN
29. In SQL, what keyword is used to compare a value with the result of a subquery returning
multiple values?
A. =
B. IN
C. EXISTS
D. LIKE
SELECT Name FROM Employee WHERE EXISTS (SELECT * FROM Department WHERE
DeptID = 'D1');
A. Returns employees from D1 only
B. Returns all employees if Department has D1
C. Returns no rows
D. Returns only departments
31. Which relational algebra operator selects tuples that satisfy a given condition?
● a) Project
● b) Join
● c) Select
● d) Union
32. Given two relations R and S, which operator combines them to produce a relation containing
all tuples from both R and S?
● a) Intersection
● b) Difference
● c) Union
● d) Product
33. The relational algebra operator that combines tuples from two relations based on a common
attribute is:
● a) Select
● b) Project
● c) Join
● d) Union
35. Which set operation returns tuples that are in both relation R and relation S?
● a) Union
● b) Difference (R - S)
● c) Intersection
● d) Cartesian Product