Database Design Using Normalization
Q. In a database, what does a 'foreign key' do?
-
A.
Links two tables together
-
B.
Identifies a unique record
-
C.
Stores large amounts of data
-
D.
Indexes a table for faster access
Solution
A foreign key links two tables together by referencing the primary key of another table.
Correct Answer: A — Links two tables together
Q. In a relational database, what is the purpose of a foreign key?
-
A.
To uniquely identify a record
-
B.
To establish a relationship between two tables
-
C.
To enforce data integrity
-
D.
To improve query performance
Solution
A foreign key is used to establish a relationship between two tables, linking records in one table to records in another.
Correct Answer: B — To establish a relationship between two tables
Q. In the context of ER modeling, what does a 'weak entity' represent?
-
A.
An entity that cannot exist without a strong entity
-
B.
An entity with no attributes
-
C.
An entity that has a composite key
-
D.
An entity that is not related to any other entity
Solution
A weak entity represents an entity that cannot exist without a strong entity, relying on it for its identification.
Correct Answer: A — An entity that cannot exist without a strong entity
Q. In the context of ER modeling, what does an 'entity' represent?
-
A.
A relationship between two tables
-
B.
A unique identifier for a record
-
C.
A real-world object or concept
-
D.
A set of attributes
Solution
An 'entity' represents a real-world object or concept in ER modeling.
Correct Answer: C — A real-world object or concept
Q. What is a common consequence of not normalizing a database?
-
A.
Increased data integrity
-
B.
Data redundancy
-
C.
Improved performance
-
D.
Simplified queries
Solution
Not normalizing a database can lead to data redundancy, which can cause inconsistencies and anomalies.
Correct Answer: B — Data redundancy
Q. What is the main advantage of using indexes in a database?
-
A.
To reduce data redundancy
-
B.
To speed up data retrieval
-
C.
To enforce data integrity
-
D.
To simplify database design
Solution
Indexes are used to speed up data retrieval operations by providing quick access paths to the data.
Correct Answer: B — To speed up data retrieval
Q. What is the main goal of the Third Normal Form (3NF)?
-
A.
To eliminate transitive dependencies
-
B.
To ensure all attributes are dependent on the primary key
-
C.
To remove duplicate rows
-
D.
To create a unique identifier for each record
Solution
The main goal of 3NF is to eliminate transitive dependencies, ensuring that non-key attributes are only dependent on the primary key.
Correct Answer: A — To eliminate transitive dependencies
Q. What is the purpose of indexing in a database?
-
A.
To enforce data integrity
-
B.
To speed up data retrieval
-
C.
To normalize data
-
D.
To create relationships between tables
Solution
Indexing is used to speed up data retrieval operations on a database.
Correct Answer: B — To speed up data retrieval
Q. What is the result of applying the first normal form (1NF) to a table?
-
A.
All attributes are atomic
-
B.
No transitive dependencies exist
-
C.
All non-key attributes are dependent on the primary key
-
D.
The table has no duplicate rows
Solution
Applying the first normal form (1NF) ensures that all attributes in a table are atomic, meaning they cannot be divided further.
Correct Answer: A — All attributes are atomic
Q. Which normal form requires that a table is in 1NF and all non-key attributes are fully functionally dependent on the primary key?
-
A.
First Normal Form (1NF)
-
B.
Second Normal Form (2NF)
-
C.
Third Normal Form (3NF)
-
D.
Boyce-Codd Normal Form (BCNF)
Solution
Second Normal Form (2NF) requires that all non-key attributes are fully functionally dependent on the primary key.
Correct Answer: B — Second Normal Form (2NF)
Q. Which of the following describes a 'transaction' in a database?
-
A.
A single operation on the database
-
B.
A sequence of operations treated as a single unit
-
C.
A method of indexing data
-
D.
A way to enforce data integrity
Solution
A transaction is a sequence of operations that are treated as a single unit of work, ensuring data integrity.
Correct Answer: B — A sequence of operations treated as a single unit
Q. Which of the following is a characteristic of a well-designed database?
-
A.
High data redundancy
-
B.
Low data integrity
-
C.
Minimal data anomalies
-
D.
Complex relationships
Solution
A well-designed database should have minimal data anomalies, ensuring data integrity and consistency.
Correct Answer: C — Minimal data anomalies
Q. Which of the following is NOT a benefit of normalization?
-
A.
Reduced data redundancy
-
B.
Improved data integrity
-
C.
Faster query performance
-
D.
Easier maintenance
Solution
Normalization can sometimes lead to slower query performance due to the need for more joins.
Correct Answer: C — Faster query performance
Q. Which of the following is NOT a characteristic of a transaction in a DBMS?
-
A.
Atomicity
-
B.
Consistency
-
C.
Isolation
-
D.
Redundancy
Solution
Redundancy is not a characteristic of a transaction; the main properties are Atomicity, Consistency, Isolation, and Durability (ACID).
Correct Answer: D — Redundancy
Showing 1 to 14 of 14 (1 Pages)