
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































Different anomalies in designing a database, The idea of normalization, Functional dependency, Armstrong’s Axioms (proofs not required), Closures and their computation, Equivalence of Functional Dependencies (FD), Minimal Cover (proofs not required). First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF), Boyce Codd Normal Form (BCNF), Lossless join and dependency preserving decomposition, Algorithms for checking Lossless Join (LJ) and Dependency Preserving (DP)
If a table is not properly normalized and have data redundancy then it will not only eat up extra memory space but will also make it difficult to handle and update the database, without facing data loss. Insertion, Updation and Deletion Anomalies are very frequent if database is not normalized.
In the table above, we have data of 4 Computer Sci. students. As we can see, data for the fields branch, hod(Head of Department) and office_tel is repeated for the students who are in the same branch in the college, this is Data Redundancy.
Suppose for a new admission, until and unless a student opts for a branch, data of the student cannot be inserted, or else we will have to set the branch information as NULL. Also, if we have to insert data of 100 students of same branch, then the branch information will be repeated for all those 100 students. These scenarios are nothing but Insertion anomalies.
In our Student table, two different informations are kept together, Student information and Branch information. Hence, at the end of the academic year, if student records are deleted, we will also lose the branch information. This is Deletion anomaly.
(^) Normalization is a database design technique that reduces data redundancy and eliminates undesirable characteristics like Insertion, Update and Deletion Anomalies. (^) Normalization rules divides larger tables into smaller tables and links them using relationships. (^) The purpose of Normalisation in SQL is to eliminate redundant (repetitive) data and ensure data is stored logically.
roll_no name dept_name dept_buildi ng 42 abc CO A 43 pqr IT A3the 44 xyz CO A
name → dept_name ◦ Students with the same name can have different dept_name, hence this is not a valid functional dependency. dept_building → dept_name ◦ There can be multiple departments in the same building, For example, in the above table departments ME and EC are in the same building B2, ◦ hence dept_building → dept_name is an invalid functional dependency.
functional dependencies: functional dependencies: (^) Reflexivity: If Y is a subset of X, then X →Y holds by reflexivity rule ◦ For example, {roll_no, name} → name is valid. (^) Augmentation: If X → Y is a valid dependency, then XZ → YZ is also valid by the augmentation rule. ◦ For example, If {roll_no,^ name}^ → dept_building is valid, hence {roll_no, name, dept_name} → {dept_building, dept_name} is also valid.→ (^) Transitivity : If X → Y and Y → Z are both valid dependencies, then X →Z is also valid by the Transitivity rule. ◦ For example, roll_no → dept_name & dept_name → dept_building, then roll_no → dept_building is also valid.
when A->B holds true where B is not a subset of A. In a relationship, if attribute B is not a subset of attribute A, then it is conside ◦ (Company} -> {CEO} (if we know the Company, we knows the CEO name) ◦ But CEO is not a subset of Company, and hence it's non-trivial functional dependency.
Multivalued dependency occurs in the situation where there are multiple independent multivalued attributes in a single table. A multivalued dependency is a complete constraint between two sets of attributes in a relation. It requires that certain tuples be present in a relation.