A Lossy Decomposition emplovee_id emplowee_name telephone nunther start_date 123-45-6789 Kim 882-0000 198403-29 987-65-4321 Kim 869-9999 1981-01-16 emplovee emploveeid enplovee_name enploveename telephonenumber startdate 123-45-6789 Kim Kim 882-0000 1984-03-29 987-65-4321 Kim Kim 869-9999 1981-01-16 emploveeid emplovee name telephone_number start_date 12345-6789 Kim 882-0000 1984-03-29 123-45-6789 Kim 869-9999 1981-01-16 987-65-4321 Kim 882-0000 198403-29 987-65-4321 Kim 869-9999 1981-01-16 Database System Concepts -5th Edition,Oct 5,2006 7.7 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 7.7 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 A Lossy Decomposition
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 Example:Set of accounts stored with each customer,and set of owners stored with each account We assume all relations are in first normal form (and revisit this in Chapter 9) Database System Concepts-5th Edition,Oct 5,2006 7.8 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 7.8 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 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 Example: Set of accounts stored with each customer, and set of owners stored with each account We assume all relations are in first normal form (and revisit this in Chapter 9)
First Normal Form (Cont'd) Atomicity is actually a property of how the elements of the domain are used. Example: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-5th Edition,Oct 5,2006 7.9 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 7.9 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 First Normal Form (Cont’d) Atomicity is actually a property of how the elements of the domain are used. Example: 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
Goal-Devise a Theory for the Following Decide whether a particular relation R is in"good"form. In the case that a relation R is not in "good"form,decompose it into a set of relations {R1,R2,...,R}such that each relation is in good form the decomposition is a lossless-join decomposition Our theory is based on: functional dependencies multivalued dependencies Database System Concepts-5th Edition,Oct 5,2006 7.10 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 7.10 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Goal — Devise a Theory for the Following Decide whether a particular relation R is in “good” form. In the case that a relation R is not in “good” form, decompose it into a set of relations {R1 , R2 , ..., Rn } such that each relation is in good form the decomposition is a lossless-join decomposition Our theory is based on: functional dependencies multivalued dependencies
Functional Dependencies Constraints on the set of legal relations. Require that the value for a certain set of attributes determines uniquely the value for another set of attributes. A functional dependency is a generalization of the notion of a key. Database System Concepts-5th Edition,Oct 5,2006 7.11 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 7.11 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Functional Dependencies Constraints on the set of legal relations. Require that the value for a certain set of attributes determines uniquely the value for another set of attributes. A functional dependency is a generalization of the notion of a key