Aslmple GUIDE to FIVE NORMAL FORMS in RELATIONAL DATABASE THEORY

Total Page:16

File Type:pdf, Size:1020Kb

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. FIRST NORMAL FORM material is granted provided First normal form [1] deals with the "shape" of a record that the copies are not made type. Under first normal form, all occurrences of a record or distributed for direct type must contain the same number of fields. First normal commercial advantage, the ACM copyright notice and form excludes variable repeating fields and groups. This the title of the publication is not so much a design guideline as a matter of defini- and its date appear, and tion. Relational database theory does not deal with rec- notice is given that copying is ords having a variable number of fields. by permission of the Association for Computing Machinery. To copy 3. SECOND AND THIRD NORMAL FORMS otherwise, or to republish, Second and third normal forms [2, 3, 7] deal with the requires a fee and/or specific permission. relationship between nonkey and key fields. Under sec- © 1983 ACM 0001-0782/83/ ond and third normal forms, a nonkey field must provide 0200-0120 75¢ a fact about the key, the whole key, and nothing but the 120 Communications of the ACM February 1983 Volume 26 Number 2 key. In addition, the record must satisfy first normal fact about another nonkey field, as in form. We deal now only with "single-valued" facts. A single- [ EMPLOYEE I DEPARTMENT I LOCATION valued fact could be a one-to-many relationship such as the department of an employee or a one-to-one relation- ..... key ...... ship such as the spouse of an employee. Thus, the phrase The EMPLOYEE field is the key. If each department is "Y is a fact about X" signifies a one-to-one or one-to- located in one place, then the LOCATION field is a fact many relationship between Y and X. In the general case, about the DEPARTMENT--in addition to being a fact Y might consist of one or more fields and so might X. In about the EMPLOYEE. The problems with this design are the following example, QUANTITY is a fact about the the same as those caused by violations of second normal combination of PART and WAREHOUSE. form. 3.1 Second Normal Form • The department's location is repeated in the record of Second normal form is violated when a nonkey field is a every employee assigned to that department. fact about a subset of a key. It is only relevant when the • If the location of the department changes, every such key is composite, i.e., consists of several fields. Consider record must be updated. the following inventory record. • Because of the redundancy, the data might become in- consistent, e.g., different records showing different loca- tions for the same department. I PART I WAREHOUSE QUANTITY ] WAREHOUSE-ADDRESS • If a department has no employees, there may be no ..... key .............. record in which to keep the department's location. The key here consists of the PART and WAREHOUSE To satisfy third normal form, the record shown above fields together, but WAREHOUSE-ADDRESS is a fact should be decomposed into the two records: about the WAREHOUSE alone. The basic problems with this design are: EMPLOYEE DEPARTMENT DEPARTMENT LOCATION • The warehouse address is repeated in every record that .... key .......... key ...... refers to a part stored in that warehouse. • If the address of the warehouse changes, every record To summarize, a record is in second and third normal referring to a part stored in that warehouse must be up- forms if every field is either part of the key or provides a dated. (single-valued) fact about exactly the whole key and noth- • Because of the redundancy, the data might become in- ing else. consistent, with different records showing different ad- dresses for the same warehouse. 3.3 Functional Dependencies • If at some point in time there are no parts stored in the In relational database theory, second and third normal warehouse, there may be no record in which to keep the forms are defined in terms of functional dependencies, warehouse's address. which correspond approximately to our single-valued facts. A field Y is "functionally dependent" on a field (or To satisfy second normal form, the record shown fields) X if it is invalid to have two records with the same above should be decomposed into (replaced by) the two X value but different Y values. That is, a given X value records: must always occur with the same Y value. When X is a key, then all fields are by definition functionally depend- ent on X in a trivial way, since there cannot be two .... key ................... records having the same X value. There is a slight technical difference between func- [WAREHOUSE[WAREHOUSE-ADDRESS tional dependencies and single-valued facts as we have ..... key ..... presented them. Functional dependencies only exist when the things involved have unique and singular identifiers When a data design is changed in this way, i.e., replacing (representations). For example, suppose a person's ad- unnormalized records with normalized records, the dress is a single-valued fact, i.e., a person has only one process is referred to as normalization. The term address. If we do not provide unique identifiers for peo- "normalization" is sometimes used relative to a particular ple, then there will not be a functional dependency in the normal form. Thus, a set of records may be normalized data. with respect to second normal form but not with respect to third. PERSON [ ADDRESS The normalized design enhances the integrity of the John Smith ~1 123 Main St., New York data by minimizing redundancy and inconsistency, but at John Smith I 321 Center St., San Francisco some possible performance cost for certain retrieval appli- cations. Consider an application that wants the addresses Although each person has a unique address, a given of all warehouses stocking a certain part. In the unnor- name can appear with several different addresses. Hence, malized form, the application searches one record type. we do not have a functional dependency corresponding to With the normalized design, the application has to search our single-valued fact. Similarly, the address has to be two record types and connect the appropriate pairs. spelled identically in each occurrence in order to have a functional dependency. In the following case, the same 3.2 Third Normal Form person appears to be living at two different addresses, Third normal form is violated when a nonkey field is a again precluding a functional dependency. February 1983 Volume 26 Number 2 Communications of the ACM 121 PERSON ] ADDRESS [EMPLOYEE SKILL EMPLOYEE[ LANGUAGE I 123 Main St., New York [IJ°hnj°hnSmithSmith t! 123 Main Street, NYC .......... key .................. key ........... Note that other fields, not involving multivalued facts, are We are not defending the use of nonunique or nonsin- permitted to occur in the record, as in the case of the gular representations. Such practices often lead to data QUANTITY field in the earlier PART/WAREHOUSE ex- maintenance problems of their own. We do wish to point ample. out, however, that functional dependencies and the var- The main problem with violating fourth normal form ious normal forms are really only defined for situations in is that it leads to uncertainties in the maintenance poli- which there are unique and singular identifiers. Thus, the cies. Several policies are possible for maintaining two in- design guidelines as we present them are a bit stronger dependent multi.valued facts in one record. than those implied by the formal definitions of the nor- mal forms. For instance, we as designers know that in the follow- (1) A disjoint format, in which a record contains either ing example there is a single-valued fact about a nonkey a skill or a language, but not both. field, and hence the design is susceptible to all the update anomalies mentioned earlier. EMPLOYEE SKILL LANGUAGE Smith cook [EMPLOYEE [FATHER [ FATHER'S-ADDRESS Smith type I Art Smith John Smith I 123 Main St., New York Smith French I Bob Smith [i John Smith [ 123 Main Street, NYC Smith German I Cal Smith John Smith [ 321 Center St., San Francisco Smith Greek I However, in formal terms, there is no functional depend- This is not much different from maintaining two separate ency here between FATHER'S-ADDRESS and FATHER, record types.
Recommended publications
  • Further Normalization of the Data Base Relational Model
    FURTHER NORMALIZATION OF THE DATA BASE RELATIONAL MODEL E. F. Codd IBM Research Laboratory San Jose, California ABSTRACT: In an earlier paper, the author proposed a relational model of data as a basis for protecting users of formatted data systems from the potentially disruptive changes in data representation caused by growth in the data base and changes in traffic. A first normal form for the time-varying collection of relations was introduced. In this paper, second and third normal forms are defined with the objective of making the collection of relations easier to understand and control, simpler to operate upon, and more informative to the casual user. The question "Can application programs be kept in a viable state when data base relations are restructured?" is discussed briefly and it is conjectured that third normal form will significantly extend the life expectancy of appli- cation programs. Fu909umxk7) August 31,197l Information technolow (IR, Documentetion, etc.) 1. 1. Introduction 1.1 Objectives of Normalization In an earlier paper [l] the author proposed a relational model of data as a basis for protecting users of formatted data systems from the potentially disruptive changes in data representation caused by growth in the variety of data types in the data base and by statistical changes in the transaction or request traffic. Using this model, both the appli- cation programmer and the interactive user view the data base as a time-varying collection of normalized relations of assorted degrees. Definitions of these terms and of the basic relational operations of projection and natural join are given in the Appendix.
    [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]
  • Characteristics of Functional Dependencies
    Chapter 14 Normalization Pearson Education © 2009 Chapter 14 - Objectives The purpose of normalization. The potential problems associated with redundant data in base relations. The concept and characteristics of functional dependency, which describes the relationship between attributes. How inference rules can identify a set of all functional dependencies for a relation. How to undertake the process of normalization. How to identify 1st, 2nd, 3rd and BCNF Normal Forms. 2 Pearson Education © 2009 Purpose of Normalization Normalization is a technique for producing a set of suitable relations that support the data requirements of an enterprise. The benefits of of Normalization: – easier for the user to access and maintain the data; – take up minimal storage space on the computer. 3 Pearson Education © 2009 Characteristics of a suitable set of relations – The minimal number of attributes necessary to support the data requirements of the enterprise; – attributes with a close logical relationship are found in the same relation; – minimal redundancy with each attribute represented only once with… – exception for attributes that form all or part of foreign keys. 4 Pearson Education © 2009 Data Redundancy and Update Anomalies Data Redundancy and Update Anomalies 5 Pearson Education © 2009 Data Redundancy and Update Anomalies StaffBranch relation has redundant data; the details of a branch are repeated for every member of staff. In contrast, the branch information appears only once for each branch in the Branch relation and only the branch number (branchNo) is repeated in the Staff relation, to represent where each member of staff is located. 6 Pearson Education © 2009 Data Redundancy and Update Anomalies Relations that contain redundant information may potentially suffer from update anomalies.
    [Show full text]
  • Developing an Application Concept of Data Dependencies of Transactions to Relational Databases
    Jouni Laakso Developing an Application Concept of Data Dependencies of Transactions to Relational Databases Helsinki Metropolia University of Applied Sciences Master's Degree Information Technology Master's Thesis 18. February 2016 Abstract Author Jouni Laakso Title Developing an Application Concept of Data Depencies of Transactions to Relational Databases Number of Pages 73 pages + 5 appendices Date 18. February 2016 Degree Master of Engineering Degree Programme Information Technology Instructor Pasi Ranne, Senior Lecturer Information systems usually use a relational database to store the application data. The relational database can be used outside of the scope of the application. The information systems has to verify the attributes to be the attributes of the transactions to the relational database. The integrity verification includes the verification of the atomicity of the attribute values and the form of their values matching the attributes type. Integrity verification includes the verification and the checking of the dependency constraints. The dependency constraints are usually other attributes the attributes are dependent on. Applications are reprogrammed for different purposes. It has been noted that a complete information system and a new application program is not always needed in the most simple information systems. Sometimes a database query language is enough to use a relational database. For example an administrator of an application can remove and add users with an SQL-editor. The thesis studies the automatic checking of the attributes of the transactions with consistency and integrity verification. The purpose was to develop a concept automatically checking the integrity and consistency of the applications attributes. With the help of the concept, the quality of the application should improve with the help of the reusable application components and with a generic application to be used in different purposes.
    [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]