DBMS 2
DBMS 2
Normalization is the process of organizing data SQL (Structured Query Language) is used for
to minimize redundancy and ensure data managing and manipulating relational
integrity. databases. It consists of several sub-languages:
o ROLLBACK: Undoes a
transaction.
Database Management System – Reviewer
14. What does the COUNT(*) function do 19. Which of the following statements
in SQL? about database indexes is true?
a) It counts all non-null values in a a) Indexes are only created on primary
column. key columns.
b) It counts the number of unique b) Indexes improve the speed of data
values in a column. retrieval operations.
c) It returns the number of rows in a c) Indexes must be rebuilt every time a
table, including those with NULL values. table is modified.
d) It counts only rows that meet a d) Indexes consume less disk space than
specific condition. the original table data.
15. What does a schema in a relational 20. In SQL, which of the following is a valid
database represent? way to rename an existing table?
a) A specific record or entry within a a) ALTER TABLE table_name RENAME
table. TO new_table_name;
b) The physical storage of database files b) MODIFY TABLE table_name RENAME
on disk. new_table_name;
c) A collection of tables, views, and c) RENAME TABLE table_name TO
other database objects. new_table_name;
d) A SQL query that has been stored for d) CREATE TABLE new_table_name AS
later execution. SELECT * FROM table_name;
16. Which of the following commands 21. What is the effect of ON DELETE
removes both table structure and its CASCADE in a FOREIGN KEY constraint?
data permanently? a) The referenced record will be
a) DELETE archived before deletion.
b) TRUNCATE b) All associated records in the
c) DROP referencing table are also deleted.
d) ALTER c) The deletion is canceled if any
17. When would you use the GROUP BY referencing records exist.
clause in a SQL query? d) The deletion will fail if the referenced
a) When sorting data alphabetically. key is part of a composite key.
b) When combining rows based on a 22. Which of the following SQL commands
shared column value for aggregation. creates a new index?
c) When filtering records using a a) CREATE UNIQUE INDEX
specific condition. b) ADD INDEX
d) When removing duplicate rows from c) ALTER TABLE ADD INDEX
a result set. d) CREATE INDEX ON TABLE
18. Which normalization form addresses 23. When normalizing a database to 3NF,
partial dependency issues in a what must be eliminated?
relational database? a) Partial dependencies
a) First Normal Form (1NF) b) Multivalued attributes
b) Second Normal Form (2NF) c) Transitive dependencies
c) Third Normal Form (3NF) d) Non-key attributes
d) Boyce-Codd Normal Form (BCNF) 24. In SQL, what does the HAVING clause
allow that the WHERE clause does not?
Database Management System – Reviewer