Normalization Flashcards
(14 cards)
What is database normalization?
The process of decomposing unsatisfactory relations by breaking up their attributes into smaller relations, and then linking these relations together using keys. This ensures that data is not duplicated, and that all data is accessible.
Why do you need to use functional dependencies while normalizing databases?
they help to identify relationships between attributes in a database. By understanding the functional dependencies between attributes, you can more easily identify which attributes should be grouped together in which tables. This helps to minimize data redundancy and improve the overall efficiency of the database.
Can you explain what normal forms mean and how they can be used?
a way of organizing data in a database so that it is more efficient and less prone to errors using keys and functional dependency
Can you give me some examples of real-world problems that require normalizing a database?
One common example is when you have duplicate data in your database. This can cause problems with data integrity and can make it difficult to keep your data accurate. Normalizing your database can help to eliminate these duplicate data and keep your database more organized.
What is meant by redundancy and why do we want to avoid it when creating a database?
Redundancy is when you have duplicate data in your database. This can cause problems because if you need to update that data, you will need to update it in multiple places. This can also lead to inconsistency if the data is not updated in all places. Normalization is the process of designing a database to avoid redundancy.
How does normalization help minimize data anomalies?
Data anomalies can occur when data is stored in a non-normalized format. When data is normalized, it is organized into a format that minimizes these anomalies. This helps to keep the data consistent and accurate, and makes it easier to update and query.
What is an example of a functional dependency?
A functional dependency is a way to determine the relationship between two attributes in a database. In order for a functional dependency to exist, the value of one attribute must determine the value of another attribute. For example, if you have a database of employees, then the employee ID number would be a functional dependency of the employee’s name. This is because the employee ID number would determine which employee’s name is being referenced.
What is denormalization? When would you choose to denormalize a database?
Denormalization is the process of adding redundant data to a database in order to improve performance. This is typically done in cases where the database is being used for read-heavy operations, and the extra data is not likely to cause inconsistency issues.
What are the main benefits of using database normalization?
1- improved data integrity
2- reduced data redundancy
3- it is easier to update and query.
4- makes it easier to design database applications, since the data is more organized and consistent.
What are the disadvantages of not normalizing a database?
1- data redundancy
2- update anomalies => insert, delete, modification
What are the three types of anomalies that occur when the database isn’t normalized?
The three types of anomalies are insertion, deletion, and modification anomalies.
What is an attribute?
An attribute is a piece of data that is associated with a particular entity in a database. Attributes can be used to describe the entity, or to provide additional information about it.
Can you explain what transitive dependencies are?
A transitive dependency is when the value of one attribute is dependent on the value of another attribute, which is in turn dependent on the value of a third attribute. In other words, if the value of attribute A is dependent on the value of attribute B, and the value of attribute B is dependent on the value of attribute C, then there is a transitive dependency between attributes A and C.
What are determinants?
Determinants are the attributes that determine the value of another attribute. In the context of database normalization, determinants are used to determine which attributes are dependent on others, and which are independent. This is important in order to properly normalize a database.