WorksheetsUnderstanding Functional Dependencies
Total questions: 15
Worksheet time: 8mins
What is a functional dependency in DBMS?
A functional dependency is a type of database normalization technique.
A functional dependency is a relationship where one attribute can have multiple values for another attribute.
A functional dependency is a relationship where one attribute uniquely determines another attribute in a database.
A functional dependency is a method for indexing data in a database.
Define the term 'candidate key'.
A candidate key is any attribute that can identify a record in a table.
A candidate key is a set of attributes that may or may not uniquely identify a record.
A candidate key is a primary key that is not used in the database.
A candidate key is a minimal set of attributes that uniquely identifies a record in a table.
What is the difference between a primary key and a candidate key?
A primary key is a selected candidate key that uniquely identifies records, while a candidate key is any potential key that can uniquely identify records.
A primary key can be composed of multiple columns, while a candidate key cannot.
A primary key is used for indexing, while a candidate key is used for data retrieval.
A primary key is always a single column, while a candidate key can be multiple columns.
Explain the concept of normalization in databases.
Normalization is the process of combining all data into a single table.
Normalization eliminates the need for relationships between tables.
Normalization is only concerned with data security and access control.
Normalization in databases is the process of structuring data to minimize redundancy and dependency by dividing it into related tables.
What are the different normal forms in database normalization?
1NF, 2NF, 3NF, 4NF, 7NF
1NF, 2NF, 3NF, 6NF
1NF, 2NF, 3NF, BCNF, 4NF, 5NF
1NF, 2NF, 3NF, 4NF, 5NF, 6NF
What is the purpose of the First Normal Form (1NF)?
To ensure that all values in a column are atomic and to eliminate repeating groups.
To group similar data types together in a single column.
To create relationships between different tables in a database.
To ensure that all columns in a table are of the same data type.
How does the Second Normal Form (2NF) differ from the First Normal Form (1NF)?
2NF allows duplicate values, while 1NF does not.
1NF requires full functional dependency of non-key attributes.
2NF focuses on reducing data redundancy, while 1NF does not.
2NF requires full functional dependency of non-key attributes on the primary key, while 1NF requires atomicity of values.
What is a transitive dependency?
A transitive dependency is a direct relationship between two primary keys.
A transitive dependency occurs when a primary key depends on another primary key.
A transitive dependency is when all attributes are dependent on the primary key directly.
A transitive dependency is a functional dependency where a non-key attribute depends on another non-key attribute, which is indirectly dependent on the primary key.
Explain the Third Normal Form (3NF).
A table is in Third Normal Form (3NF) if it is in Second Normal Form and all the attributes are functionally dependent only on the primary key.
A table is in Third Normal Form if it contains no foreign keys.
A table is in Third Normal Form if all attributes are dependent on each other.
A table is in First Normal Form if it has no repeating groups.
What is Boyce-Codd Normal Form (BCNF)?
A relation is in Boyce-Codd Normal Form (BCNF) if every determinant is a candidate key.
A relation is in BCNF if it contains only one candidate key.
A relation is in BCNF if every attribute is a primary key.
A relation is in BCNF if it has no transitive dependencies.
What are the advantages of normalizing a database?
Slower query performance
Increased data duplication
More complex data relationships
Advantages of normalizing a database include reduced data redundancy, improved data integrity, minimized anomalies, enhanced query performance, and easier maintenance.
What is denormalization and when is it used?
Denormalization is the process of optimizing the read performance of a database by reducing the number of tables and joins, often used in data warehousing and reporting.
Denormalization refers to the process of normalizing data to eliminate redundancy.
Denormalization is the process of increasing the number of tables in a database.
Denormalization is used to improve write performance in transactional systems.
How can functional dependencies help in database design?
Functional dependencies help in increasing data duplication.
Functional dependencies are used to create user interfaces.
Functional dependencies are irrelevant to database performance.
Functional dependencies help in identifying and eliminating redundancy, ensuring data integrity, and guiding normalization in database design.
What is a composite key?
A composite key is a type of foreign key used to link tables.
A composite key is a key that can be duplicated across different records.
A composite key is a unique identifier made up of two or more columns in a database.
A composite key is a single column that uniquely identifies a record.
Explain the role of foreign keys in maintaining referential integrity.
Foreign keys are primarily used for data encryption.
Foreign keys maintain referential integrity by ensuring that relationships between tables remain consistent, preventing orphaned records.
Foreign keys allow duplicate entries in a table.
Foreign keys are used to create indexes for faster queries.
