Computer

Normalization & Indexing MCQs with Answers

What is the primary goal of normalization in a database?
a) To reduce redundancy and improve data integrity
b) To improve data retrieval speed
c) To increase data redundancy
d) To ensure faster transaction processing

Answer
a) To reduce redundancy and improve data integrity

Which of the following is the first normal form (1NF) requirement?
a) No partial dependencies
b) All attributes must be atomic
c) No transitive dependencies
d) No redundancy

Answer
b) All attributes must be atomic

What is the purpose of second normal form (2NF)?
a) To remove partial dependency
b) To ensure no transitive dependencies
c) To eliminate duplicate columns
d) To combine tables for faster queries

Answer
a) To remove partial dependency

Which of the following is a characteristic of third normal form (3NF)?
a) Elimination of partial dependencies
b) Elimination of transitive dependencies
c) Elimination of multi-valued dependencies
d) All of the above

Answer
b) Elimination of transitive dependencies

Which of the following is true about Boyce-Codd Normal Form (BCNF)?
a) Every determinant is a candidate key
b) It removes all functional dependencies
c) It allows partial dependencies
d) It allows transitive dependencies

Answer
a) Every determinant is a candidate key

Which of the following is a violation of the first normal form (1NF)?
a) Storing duplicate data in different rows
b) Storing multi-valued attributes in a single field
c) Having transitive dependencies between columns
d) Having partial dependencies in a table

Answer
b) Storing multi-valued attributes in a single field

What is a potential disadvantage of normalization?
a) Increased data redundancy
b) Reduced query performance due to more joins
c) Increased complexity in designing tables
d) Difficulty in defining primary keys

Answer
b) Reduced query performance due to more joins

What is denormalization in database design?
a) The process of removing redundancy and improving data integrity
b) The process of combining multiple tables into one to improve performance
c) The process of removing tables that are not needed
d) The process of ensuring all data is consistent

Answer
b) The process of combining multiple tables into one to improve performance

Which of the following is an indexing technique used to speed up the retrieval of data?
a) Binary Search
b) Hashing
c) B-tree indexing
d) All of the above

Answer
d) All of the above

Which of the following is a primary advantage of using indexes in a database?
a) They reduce redundancy
b) They improve query performance
c) They ensure data integrity
d) They increase data redundancy

Answer
b) They improve query performance

Which type of index is most commonly used in relational databases?
a) Clustered index
b) Non-clustered index
c) Composite index
d) Hash index

Answer
b) Non-clustered index

What is a clustered index?
a) An index where the data is stored in a separate file from the index
b) An index where the data is physically sorted according to the index
c) An index that allows for quick searches using a hash function
d) An index that is used for non-relational databases

Answer
b) An index where the data is physically sorted according to the index

Which of the following statements is true about composite indexes?
a) They use multiple columns for indexing
b) They only index one column
c) They are used for tables with very few columns
d) They do not improve query performance

Answer
a) They use multiple columns for indexing

Which type of index does not affect the physical ordering of data?
a) Clustered index
b) Non-clustered index
c) Composite index
d) Full-text index

Answer
b) Non-clustered index

Which of the following is a characteristic of hash indexing?
a) It stores data in sorted order
b) It uses a hashing function to map keys to specific locations
c) It is ideal for range queries
d) It is slower than B-tree indexing

Answer
b) It uses a hashing function to map keys to specific locations

Which of the following scenarios is ideal for using a non-clustered index?
a) When you need to store data in sorted order
b) When the indexed column is frequently used in queries
c) When you need to store large amounts of data
d) When only one column is involved in most queries

Answer
b) When the indexed column is frequently used in queries

What is the main disadvantage of creating too many indexes in a database?
a) Increased storage requirements
b) Slower data retrieval
c) Higher data integrity
d) Decreased complexity in queries

Answer
a) Increased storage requirements

Which of the following is true about the uniqueness of an index in a database?
a) An index can be created on any column, but it must be unique
b) An index must be unique in order to be created
c) An index can be created on non-unique columns
d) An index must always be composite

Answer
c) An index can be created on non-unique columns

What does an index improve in a database query?
a) Data consistency
b) Data retrieval speed
c) Data security
d) Data integrity

Answer
b) Data retrieval speed

Which of the following is a disadvantage of using composite indexes?
a) They require more storage space
b) They improve query performance for all types of queries
c) They reduce the number of joins needed
d) They are faster to create than regular indexes

Answer
a) They require more storage space

Which type of query is best suited for a hash index?
a) Range queries
b) Exact match queries
c) Join queries
d) Aggregation queries

Answer
b) Exact match queries

In which situation would you most likely use a clustered index?
a) When you need to index a column that contains unique data
b) When you need to improve range query performance
c) When you are working with non-relational data
d) When you want to ensure that the data is not sorted

Answer
b) When you need to improve range query performance

Which of the following is a key benefit of denormalization?
a) It reduces redundancy
b) It decreases storage requirements
c) It speeds up read operations by reducing the need for joins
d) It ensures data consistency

Answer
c) It speeds up read operations by reducing the need for joins

Which of the following is an example of a violation of second normal form (2NF)?
a) Storing multi-valued attributes in a single field
b) A non-prime attribute is functionally dependent on a part of a candidate key
c) Storing redundant data across multiple tables
d) Storing transitive dependencies in a single table

Answer
b) A non-prime attribute is functionally dependent on a part of a candidate key

What type of indexing is most commonly used for text searching?
a) B-tree indexing
b) Hash indexing
c) Full-text indexing
d) Clustered indexing

Answer
c) Full-text indexing

Which of the following best describes the concept of “indexing” in databases?
a) A method of securing data
b) A way of organizing data to improve retrieval speed
c) A technique to backup data
d) A method of encrypting sensitive information

Answer
b) A way of organizing data to improve retrieval speed

What does the term “partial dependency” refer to in the context of normalization?
a) A non-prime attribute is dependent on the entire primary key
b) A non-prime attribute is dependent on a part of the primary key
c) A dependency between two non-prime attributes
d) A functional dependency that violates third normal form

Answer
b) A non-prime attribute is dependent on a part of the primary key

What is a key disadvantage of using a clustered index?
a) It slows down insertions and updates
b) It requires more storage space
c) It does not improve performance
d) It allows for non-unique values in indexed columns

Answer
a) It slows down insertions and updates

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button