Functional Dependencies Keys Armstrong's Axioms Splitting

Total Page:16

File Type:pdf, Size:1020Kb

Functional Dependencies Keys Armstrong's Axioms Splitting Functional Dependencies Keys Armstrong's Axioms A . A B . B Assume a relation with schema R(A , . ., A ). Reflexivity – If {B , . ., B } {A , . ., A } then 1 m 1 n 1 n 1 n 1 m A subset of {A , . ., A } is a superkey of R if it functionally A . A B . B . (These are the trivial functional 1 n 1 m 1 n determines all the attributes of R. dependencies.) “A , . ., A functionally determine B , . ., B ” 1 m 1 n Augmentation – If A . A B . B , then A superkey is a key if no proper subset of it is a superkey. 1 m 1 n A . A C . C B . B C . C . 1 m 1 k 1 n 1 k gearhead(person_ID, main_address, make, model, year, color, Transitivity – If A . A B . B and B . B C . income, parking_space, age, insurance_policy, tag_number) 1 m 1 n 1 n 1 . C , then A . A C . C . k 1 m 1 k These are sufficient to infer the consequences of a set of functional dependencies. 1 2 3 Splitting/Combining Closure of Attributes Computing the Closure A useful consequence of Armstrong's axioms is the Suppose that S is a set of functional dependencies and that To compute the closure of {A , . ., A } with respect to S: 1 m splitting/combining rule. {A , . ., A } is a set of attributes. The closure of {A , . ., 1 m 1 Let X = {A , . ., A }. A } (with respect to S) is the set of attributes B such that 1 m m A . A B is a consequence of the functional Repeat: A . A B . B 1 m 1 m 1 n dependencies in S. If B . B C . C is in S and {B , . ., B } is a subset if and only if 1 k 1 n 1 k of X, then for each i from 1 to n, C is added to X if it is not i for every i from 1 to n, A . A B . 1 m i The closure is denoted by {A , . ., A }+. already in X. 1 m (See Exercise 3.2.2 for some other potentially useful Until X cannot be made any larger. consequences.) 4 5 6 Minimal Bases Computing a minimal basis Projecting a set of FDs It is often useful to work with a minimal basis for a set of To compute a minimal basis from a set S of FDs: Given R(A , . ., A ) and set S of FDs. Suppose that R is the 1 n 1 functional dependencies and their consequences. projection (R). What functional dependencies hold on R ? Set S' to the FDs from S split so that all right sides are L 1 A minimal basis for a set S of functional dependencies and singletons. their consequences is a set B such that Let T be empty. Repeat: For each subset X of the attributes of R , compute X + with The FDs in B all have singleton right sides. 1 If a FD can be inferred from the other FDs in S', remove it. + If any FD is removed from B, the consequences of those respect to S and add X A to T for each attribute A in X If FD1 = A . A B and FD2 is the same with A that is also an attribute of R . that are left do not equal the consequences of S. 1 m i 1 removed for some i and FD2 can be inferred from S', If any attribute is removed from the left side of any FD in It is recommended that a minimal basis be computed for T. B, the consequences of the altered B do not equal the remove FD1 from S' and add FD2. Note that the proof that a FD belongs to T may refer to consequences of S. Until S' cannot be changed anymore. attributes of R that are not attributes of R . 1 7 8 9 Anomalies Anomalies(cont.) Normalization The main source of maintenance problems is requiring that too Insertion anomaly – When we input information about one Anomalies are reduced by decomposing a table into two or much information be stored in each row of a table, usually object, we are forced to input information about another more tables so that certain conditions are satisfied. A table because each row describes the properties of more than one object as well. that satisfies those conditions are said to be in normal form . object. Deletion anomaly – When delete all information about one Commonly used normal forms are: Redundancy – The same information about one object is object, we may delete information about another object as Boyce-Codd Normal Form (BCNF) stored in more than one row (because the object is related to well. (The information about the second object only more than one other object). appears in rows that contain the information about the first Third Normal Form object.) Update anomaly - When information about one object is Fourth Normal Form updated in one row, it may not be updated in all the other (Others exist: Fifth Normal Form, Domain Key Normal Form, rows where it exists. Project-Join Normal Form.) [gearhead] 10 11 12 First & Second Normal Forms Decomposition Boyce-Codd Normal Form A relation is in First Normal Form if its attribute domains If a relation is not in a desired advanced normal form, it is A relation R is in Boyce-Codd Normal Form if the left side of contain only atomic values (the values have no internal decomposed into two or more relations, each of which is in every nontrivial functional dependency for R is a superkey structure of interest to us). the desired advanced normal form. for R. (It is easy to set up a database so that all relations are in First A set of relations {R , ..., R } is a decomposition of a relation 1 n This avoids redundancy: suppose AB C, B D. The Normal Form from the beginning.) R if each R is a projection from R and the union of the relation R(A,B,C,D) is not in Boyce-Codd Normal Form. i A relation is in Second Normal Form if each attribute is either attributes for all the relations in the set equals the set of A | B | C | D A | B | C B | D in a key for the relation or is functionally determined only attributes for R. by one or more keys for the relation. (No attribute not in a 1 | 1 | 2 | 4 de- 1 | 1 | 2 1 | 4 key is functionally determined by a proper subset of a key.) 1 | 2 | 3 | 6 com- 1 | 2 | 3 2 | 6 (More advanced normal forms will imply that a relation is also 2 | 1 | 1 | 4 pose: 2 | 1 | 1 in Second Normal Form.) [gearhead] 2 | 2 | 4 | 6 2 | 2 | 4 13 14 15 Computing BCNF Testing X Y Lossless Joins Given a relation R(A , . ., A ) and set S of its functional + + The decomposition produced by the previous algorithm has 1 n To test whether X is a superkey for R, compute X . If X does dependencies. not contain all the attributes of R, X is not a superkey and the property that it has a lossless join , that is, the natural join the FD X Y violates the conditions for BCNF. of the relations in the decomposition reproduces the original Test the FDs in S until one is found, say X Y, where X is relation. (No information is lost.) not a superkey for R. (If none found, stop.) Example where join is not lossless: Replace R and S with R (X +) and the projection of S down to 1 A | B | C A | B B | C A | B | C R , and R (((A , . ., A ) − (X + − X)) and the projection of S 1 2 1 n 1 | 2 | 3 1 | 2 2 | 3 1 | 2 | 3 down to R . 2 4 | 2 | 6 4 | 2 2 | 6 1 | 2 | 6 Repeat the above on R and R with their sets of functional 1 2 4 | 2 | 3 dependencies. 4 | 2 | 6 16 [gearhead] 17 18 Chase Test Chase Test Example FDs Can Be Lost Given R(L) decomposed into R (L ), i = 1,...,k. For each i, i i Given R(A,B,C,D), FDs A B, B C, CD A. R is Given R(A,B,C) with FDs AB C, C A. Decompose R make a tuple t for R such that for each attribute A in L , the decomposed into R (A,D), R (A,C), R (B,C,D). into Boyce-Codd Normal Form relations. i i 1 2 3 value of A in t is a, and the other values in t are distinct t = < a, X1, X2, a > R (C, A) with FD C A i i 1 1 variables. t = < a, X3, a, X4> R (B,C) with no FDs Use the FDs for R to infer what values the variables have to 2 2 be. If the tuple < a,..., a> can be derived, the decomposition t = <X5, a, a, a> FD AB C has been lost. 3 has the lossless join property. If it can't be derived, the variables can be given non- a values so that the original t s Tuple < a, a , a, a> can be deduced. i form an instance of R that is not reproduced by the natural join of the R s. i 19 20 21 Third Normal Form 3NF Synthesis Algorithm Multivalued Dependencies A relation R is in Third Normal Form if the left side of every Given relation R and a minimal basis S of the FDs for R.
Recommended publications
  • Functional Dependencies
    Basics of FDs Manipulating FDs Closures and Keys Minimal Bases Functional Dependencies T. M. Murali October 19, 21 2009 T. M. Murali October 19, 21 2009 CS 4604: Functional Dependencies Students(Id, Name) Advisors(Id, Name) Advises(StudentId, AdvisorId) Favourite(StudentId, AdvisorId) I Suppose we perversely decide to convert Students, Advises, and Favourite into one relation. Students(Id, Name, AdvisorId, AdvisorName, FavouriteAdvisorId) Basics of FDs Manipulating FDs Closures and Keys Minimal Bases Example Name Id Name Id Students Advises Advisors Favourite I Convert to relations: T. M. Murali October 19, 21 2009 CS 4604: Functional Dependencies I Suppose we perversely decide to convert Students, Advises, and Favourite into one relation. Students(Id, Name, AdvisorId, AdvisorName, FavouriteAdvisorId) Basics of FDs Manipulating FDs Closures and Keys Minimal Bases Example Name Id Name Id Students Advises Advisors Favourite I Convert to relations: Students(Id, Name) Advisors(Id, Name) Advises(StudentId, AdvisorId) Favourite(StudentId, AdvisorId) T. M. Murali October 19, 21 2009 CS 4604: Functional Dependencies Basics of FDs Manipulating FDs Closures and Keys Minimal Bases Example Name Id Name Id Students Advises Advisors Favourite I Convert to relations: Students(Id, Name) Advisors(Id, Name) Advises(StudentId, AdvisorId) Favourite(StudentId, AdvisorId) I Suppose we perversely decide to convert Students, Advises, and Favourite into one relation. Students(Id, Name, AdvisorId, AdvisorName, FavouriteAdvisorId) T. M. Murali October 19, 21 2009 CS 4604: Functional Dependencies Name and FavouriteAdvisorId. Id ! Name Id ! FavouriteAdvisorId AdvisorId ! AdvisorName I Can we say Id ! AdvisorId? NO! Id is not a key for the Students relation. I What is the key for the Students? fId, AdvisorIdg.
    [Show full text]
  • Normalized Form Snowflake Schema
    Normalized Form Snowflake Schema Half-pound and unascertainable Wood never rhubarbs confoundedly when Filbert snore his sloop. Vertebrate or leewardtongue-in-cheek, after Hazel Lennie compartmentalized never shreddings transcendentally, any misreckonings! quite Crystalloiddiverted. Euclid grabbles no yorks adhered The star schemas in this does not have all revenue for this When done use When doing table contains less sensible of rows Snowflake Normalizationde-normalization Dimension tables are in normalized form the fact. Difference between Star Schema & Snow Flake Schema. The major difference between the snowflake and star schema models is slot the dimension tables of the snowflake model may want kept in normalized form to. Typically most of carbon fact tables in this star schema are in the third normal form while dimensional tables are de-normalized second normal. A relation is danger to pause in First Normal Form should each attribute increase the. The model is lazy in single third normal form 1141 Options to Normalize Assume that too are 500000 product dimension rows These products fall under 500. Hottest 'snowflake-schema' Answers Stack Overflow. Learn together is Star Schema Snowflake Schema And the Difference. For step three within the warehouses we tested Redshift Snowflake and Bigquery. On whose other hand snowflake schema is in normalized form. The CWM repository schema is a standalone product that other products can shareeach product owns only. The main difference between in two is normalization. Families of normalized form snowflake schema snowflake. Star and Snowflake Schema in Data line with Examples. Is spread the dimension tables in the snowflake schema are normalized. Like price weight speed and quantitiesie data execute a numerical format.
    [Show full text]
  • Relational Database Design Chapter 7
    Chapter 7: Relational Database Design Chapter 7: Relational Database Design First Normal Form Pitfalls in Relational Database Design Functional Dependencies Decomposition Boyce-Codd Normal Form Third Normal Form Multivalued Dependencies and Fourth Normal Form Overall Database Design Process Database System Concepts 7.2 ©Silberschatz, Korth and Sudarshan 1 First Normal Form Domain is atomic if its elements are considered to be indivisible units + Examples of non-atomic domains: Set of names, composite attributes Identification numbers like CS101 that can be broken up into parts A relational schema R is in first normal form if the domains of all attributes of R are atomic Non-atomic values complicate storage and encourage redundant (repeated) storage of data + E.g. Set of accounts stored with each customer, and set of owners stored with each account + We assume all relations are in first normal form (revisit this in Chapter 9 on Object Relational Databases) Database System Concepts 7.3 ©Silberschatz, Korth and Sudarshan First Normal Form (Contd.) Atomicity is actually a property of how the elements of the domain are used. + E.g. Strings would normally be considered indivisible + Suppose that students are given roll numbers which are strings of the form CS0012 or EE1127 + If the first two characters are extracted to find the department, the domain of roll numbers is not atomic. + Doing so is a bad idea: leads to encoding of information in application program rather than in the database. Database System Concepts 7.4 ©Silberschatz, Korth and Sudarshan 2 Pitfalls in Relational Database Design Relational database design requires that we find a “good” collection of relation schemas.
    [Show full text]
  • Boyce-Codd Normal Forms Lecture 10 Sections 15.1 - 15.4
    Boyce-Codd Normal Forms Lecture 10 Sections 15.1 - 15.4 Robb T. Koether Hampden-Sydney College Wed, Feb 6, 2013 Robb T. Koether (Hampden-Sydney College) Boyce-Codd Normal Forms Wed, Feb 6, 2013 1 / 15 1 Third Normal Form 2 Boyce-Codd Normal Form 3 Assignment Robb T. Koether (Hampden-Sydney College) Boyce-Codd Normal Forms Wed, Feb 6, 2013 2 / 15 Outline 1 Third Normal Form 2 Boyce-Codd Normal Form 3 Assignment Robb T. Koether (Hampden-Sydney College) Boyce-Codd Normal Forms Wed, Feb 6, 2013 3 / 15 Third Normal Form Definition (Transitive Dependence) A set of attributes Z is transitively dependent on a set of attributes X if there exists a set of attributes Y such that X ! Y and Y ! Z. Definition (Third Normal Form) A relation R is in third normal form (3NF) if it is in 2NF and there is no nonprime attribute of R that is transitively dependent on any key of R. 3NF is violated if there is a nonprime attribute A that depends on something less than a key. Robb T. Koether (Hampden-Sydney College) Boyce-Codd Normal Forms Wed, Feb 6, 2013 4 / 15 Example Example order_no cust_no cust_name 222-1 3333 Joe Smith 444-2 4444 Sue Taylor 555-1 3333 Joe Smith 777-2 7777 Bob Sponge 888-3 4444 Sue Taylor Table 3 Table 3 is in 2NF, but it is not in 3NF because [order_no] ! [cust_no] ! [cust_name]: Robb T. Koether (Hampden-Sydney College) Boyce-Codd Normal Forms Wed, Feb 6, 2013 5 / 15 3NF Normalization To put a relation into 3NF, for each set of transitive function dependencies X ! Y ! Z , make two tables, one for X ! Y and another for Y ! Z .
    [Show full text]
  • Normalization
    Normalization Normalization is a process in which we refine the quality of the logical design. Some call it a form of evaluation or validation. Codd said normalization is a process of elimination, through which we represent the table in a preferred format. Normalization is also called “non-loss decomposition” because a table is broken into smaller components but no information is lost. Are We Normal? If all values in a table are single atomic values (this is first normal form, or 1NF) then our database is technically in “normal form” according to Codd—the “math” of set theory and predicate logic will work. However, we usually want to do more to get our DB into a preferred format. We will take our databases to at least 3rd normal form. Why Do We Normalize? 1. We want the design to be easy to understand, with clear meaning and attributes in logical groups. 2. We want to avoid anomalies (data errors created on insertion, deletion, or modification) Suppose we have the table Nurse (SSN, Name, Unit, Unit Phone) Insertion anomaly: You need to insert the unit phone number every time you enter a nurse. What if you have a new unit that does not have any assigned staff yet? You can’t create a record with a blank primary key, so you can’t just leave nurse SSN blank. You would have no place to record the unit phone number until after you hire at least 1 nurse. Deletion anomaly: If you delete the last nurse on the unit you no longer have a record of the unit phone number.
    [Show full text]
  • Normalization Exercises
    DATABASE DESIGN: NORMALIZATION NOTE & EXERCISES (Up to 3NF) Tables that contain redundant data can suffer from update anomalies, which can introduce inconsistencies into a database. The rules associated with the most commonly used normal forms, namely first (1NF), second (2NF), and third (3NF). The identification of various types of update anomalies such as insertion, deletion, and modification anomalies can be found when tables that break the rules of 1NF, 2NF, and 3NF and they are likely to contain redundant data and suffer from update anomalies. Normalization is a technique for producing a set of tables with desirable properties that support the requirements of a user or company. Major aim of relational database design is to group columns into tables to minimize data redundancy and reduce file storage space required by base tables. Take a look at the following example: StdSSN StdCity StdClass OfferNo OffTerm OffYear EnrGrade CourseNo CrsDesc S1 SEATTLE JUN O1 FALL 2006 3.5 C1 DB S1 SEATTLE JUN O2 FALL 2006 3.3 C2 VB S2 BOTHELL JUN O3 SPRING 2007 3.1 C3 OO S2 BOTHELL JUN O2 FALL 2006 3.4 C2 VB The insertion anomaly: Occurs when extra data beyond the desired data must be added to the database. For example, to insert a course (CourseNo), it is necessary to know a student (StdSSN) and offering (OfferNo) because the combination of StdSSN and OfferNo is the primary key. Remember that a row cannot exist with NULL values for part of its primary key. The update anomaly: Occurs when it is necessary to change multiple rows to modify ONLY a single fact.
    [Show full text]
  • Adequacy of Decompositions of Relational Databases*9+
    JOURNAL OF COMPUTER AND SYSTEM SCIENCES 21, 368-379 (1980) Adequacy of Decompositions of Relational Databases*9+ DAVID MAIER State University of New York, Stony Brook, New York 11794 0. MENDELZON IBM Thomas J. Watson Research Center, Yorktown Heights, New York 10598 FEREIDOON SADRI Princeton University, Princeton, New Jersey 08540 AND JEFFREY D. ULLMAN Stanford University, Stanford, California 94305 Received August 6, 1979; revised July 16, 1980 We consider conditions that have appeared in the literature with the purpose of defining a “good” decomposition of a relation scheme. We show that these notions are equivalent in the case that all constraints in the database are functional dependencies. This result solves an open problem of Rissanen. However, for arbitrary constraints the notions are shown to differ. I. BASIC DEFINITIONS We assume the reader is familiar with the relational model of data as expounded by Codd [ 111, in which data are represented by tables called relations. Rows of the tables are tuples, and the columns are named by attributes. The notation used in this paper is that found in Ullman [23]. A frequent viewpoint is that the “real world” is modeled by a universal set of attributes R and constraints on the set of relations that can be the “current” relation for scheme R (see Beeri et al. [4], Aho et al. [ 11, and Beeri et al. [7]). The database scheme representing the real world is a collection of (nondisjoint) subsets of the * Work partially supported by NSF Grant MCS-76-15255. D. Maier and A. 0. Mendelzon were also supported by IBM fellowships while at Princeton University, and F.
    [Show full text]
  • Fundamentals of Database Systems [Normalization – II]
    Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form Fundamentals of Database Systems [Normalization { II] Malay Bhattacharyya Assistant Professor Machine Intelligence Unit Indian Statistical Institute, Kolkata October, 2019 Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form 1 First Normal Form 2 Second Normal Form 3 Third Normal Form 4 Boyce-Codd Normal Form Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form First normal form The domain (or value set) of an attribute defines the set of values it might contain. A domain is atomic if elements of the domain are considered to be indivisible units. Company Make Company Make Maruti WagonR, Ertiga Maruti WagonR, Ertiga Honda City Honda City Tesla RAV4 Tesla, Toyota RAV4 Toyota RAV4 BMW X1 BMW X1 Only Company has atomic domain None of the attributes have atomic domains Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form First normal form Definition (First normal form (1NF)) A relational schema R is in 1NF iff the domains of all attributes in R are atomic. The advantages of 1NF are as follows: It eliminates redundancy It eliminates repeating groups. Note: In practice, 1NF includes a few more practical constraints like each attribute must be unique, no tuples are duplicated, and no columns are duplicated. Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form First normal form The following relation is not in 1NF because the attribute Model is not atomic. Company Country Make Model Distributor Maruti India WagonR LXI, VXI Carwala Maruti India WagonR LXI Bhalla Maruti India Ertiga VXI Bhalla Honda Japan City SV Bhalla Tesla USA RAV4 EV CarTrade Toyota Japan RAV4 EV CarTrade BMW Germany X1 Expedition CarTrade We can convert this relation into 1NF in two ways!!! Outline First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form First normal form Approach 1: Break the tuples containing non-atomic values into multiple tuples.
    [Show full text]
  • Aslmple GUIDE to FIVE NORMAL FORMS in RELATIONAL DATABASE THEORY
    COMPUTING PRACTICES ASlMPLE GUIDE TO FIVE NORMAL FORMS IN RELATIONAL DATABASE THEORY W|LL|AM KErr International Business Machines Corporation 1. INTRODUCTION The normal forms defined in relational database theory represent guidelines for record design. The guidelines cor- responding to first through fifth normal forms are pre- sented, in terms that do not require an understanding of SUMMARY: The concepts behind relational theory. The design guidelines are meaningful the five principal normal forms even if a relational database system is not used. We pres- in relational database theory are ent the guidelines without referring to the concepts of the presented in simple terms. relational model in order to emphasize their generality and to make them easier to understand. Our presentation conveys an intuitive sense of the intended constraints on record design, although in its informality it may be impre- cise in some technical details. A comprehensive treatment of the subject is provided by Date [4]. The normalization rules are designed to prevent up- date anomalies and data inconsistencies. With respect to performance trade-offs, these guidelines are biased to- ward the assumption that all nonkey fields will be up- dated frequently. They tend to penalize retrieval, since Author's Present Address: data which may have been retrievable from one record in William Kent, International Business Machines an unnormalized design may have to be retrieved from Corporation, General several records in the normalized form. There is no obli- Products Division, Santa gation to fully normalize all records when actual perform- Teresa Laboratory, ance requirements are taken into account. San Jose, CA Permission to copy without fee all or part of this 2.
    [Show full text]
  • A Hybrid Approach to Functional Dependency Discovery
    A Hybrid Approach to Functional Dependency Discovery Thorsten Papenbrock Felix Naumann Hasso Plattner Institute (HPI) Hasso Plattner Institute (HPI) 14482 Potsdam, Germany 14482 Potsdam, Germany [email protected] [email protected] ABSTRACT concrete metadata. One reason is that they depend not only Functional dependencies are structural metadata that can on a schema but also on a concrete relational instance. For be used for schema normalization, data integration, data example, child ! teacher might hold for kindergarten chil- cleansing, and many other data management tasks. Despite dren, but it does not hold for high-school children. Conse- their importance, the functional dependencies of a specific quently, functional dependencies also change over time when dataset are usually unknown and almost impossible to dis- data is extended, altered, or merged with other datasets. cover manually. For this reason, database research has pro- Therefore, discovery algorithms are needed that reveal all posed various algorithms for functional dependency discov- functional dependencies of a given dataset. ery. None, however, are able to process datasets of typical Due to the importance of functional dependencies, many real-world size, e.g., datasets with more than 50 attributes discovery algorithms have already been proposed. Unfor- and a million records. tunately, none of them is able to process datasets of real- world size, i.e., datasets with more than 50 columns and We present a hybrid discovery algorithm called HyFD, which combines fast approximation techniques with efficient a million rows, as a recent study showed [20]. Because validation techniques in order to find all minimal functional the need for normalization, cleansing, and query optimiza- dependencies in a given dataset.
    [Show full text]
  • Database Normalization
    Outline Data Redundancy Normalization and Denormalization Normal Forms Database Management Systems Database Normalization Malay Bhattacharyya Assistant Professor Machine Intelligence Unit and Centre for Artificial Intelligence and Machine Learning Indian Statistical Institute, Kolkata February, 2020 Malay Bhattacharyya Database Management Systems Outline Data Redundancy Normalization and Denormalization Normal Forms 1 Data Redundancy 2 Normalization and Denormalization 3 Normal Forms First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form Elementary Key Normal Form Fourth Normal Form Fifth Normal Form Domain Key Normal Form Sixth Normal Form Malay Bhattacharyya Database Management Systems These issues can be addressed by decomposing the database { normalization forces this!!! Outline Data Redundancy Normalization and Denormalization Normal Forms Redundancy in databases Redundancy in a database denotes the repetition of stored data Redundancy might cause various anomalies and problems pertaining to storage requirements: Insertion anomalies: It may be impossible to store certain information without storing some other, unrelated information. Deletion anomalies: It may be impossible to delete certain information without losing some other, unrelated information. Update anomalies: If one copy of such repeated data is updated, all copies need to be updated to prevent inconsistency. Increasing storage requirements: The storage requirements may increase over time. Malay Bhattacharyya Database Management Systems Outline Data Redundancy Normalization and Denormalization Normal Forms Redundancy in databases Redundancy in a database denotes the repetition of stored data Redundancy might cause various anomalies and problems pertaining to storage requirements: Insertion anomalies: It may be impossible to store certain information without storing some other, unrelated information. Deletion anomalies: It may be impossible to delete certain information without losing some other, unrelated information.
    [Show full text]
  • SEMESTER-II Functional Dependencies
    For SEMESTER-II Paper II : Database Management Systems(CODE: CSC-RC-2016) Topics: Functional dependencies, Normalization and Normal forms up to 3NF Functional Dependencies A functional dependency (FD) is a relationship between two attributes, typically between the primary key and other non-key attributes within a table. A functional dependency denoted by X Y , is an association between two sets of attribute X and Y. Here, X is called the determinant, and Y is called the dependent. For example, SIN ———-> Name, Address, Birthdate Here, SIN determines Name, Address and Birthdate.So, SIN is the determinant and Name, Address and Birthdate are the dependents. Rules of Functional Dependencies 1. Reflexive rule : If Y is a subset of X, then X determines Y . 2. Augmentation rule: It is also known as a partial dependency, says if X determines Y, then XZ determines YZ for any Z 3. Transitivity rule: Transitivity says if X determines Y, and Y determines Z, then X must also determine Z Types of functional dependency The following are types functional dependency in DBMS: 1. Fully-Functional Dependency 2. Partial Dependency 3. Transitive Dependency 4. Trivial Dependency 5. Multivalued Dependency Full functional Dependency A functional dependency XY is said to be a full functional dependency, if removal of any attribute A from X, the dependency does not hold any more. i.e. Y is fully functional dependent on X, if it is Functionally Dependent on X and not on any of the proper subset of X. For example, {Emp_num,Proj_num} Hour Is a full functional dependency. Here, Hour is the working time by an employee in a project.
    [Show full text]