240 likes | 390 Views
Database Normalization. Raymond Mark/Learn iT! Incorporated. What Is Normalization?. Process of modifying a database into different normal forms (stages of normalization) Process of organizing data to eliminate repetition Process of organizing data to make a database more efficient.
E N D
Database Normalization Raymond Mark/Learn iT! Incorporated
What Is Normalization? • Process of modifying a database into different normal forms (stages of normalization) • Process of organizing data to eliminate repetition • Process of organizing data to make a database more efficient
Normal Forms • First Normal Form • Flat file tables • No field repetition • Second Normal Form • Meets all First Normal Form requirements • Non-key attributes are functionally dependent on primary key
Normal Forms • Third Normal Form(Boyce-Codd Normal Form, BCNF) • Meets all Second Normal Form requirements • Eliminates all fields not fully dependent on the primary key field
Normal Forms • Fourth Normal Form • Meets all Third Normal Form requirements • Given relation may not contain more than one multivalued attribute • Fifth Normal Form • Meets all Third Normal Form requirements • Contains data that enables reconstruction of original data source
Database Design Guidelines • Spend the bulk of your effort on table and relational design • Consider the tradeoff between normalization rules and actual data usage • Establish table objects and relationships before creating other MS Access objects • Use consistent naming conventions • Test your objects and design before fully populating tables
Normalizing Guidelines • Make Your Data Atomic • Avoid Field Repetition • Avoid Data Repetition • Make Primary Keys Short and Stable • Maintain Table Relevance • Maintain Field Independence
Rule 1: Make Your Data Atomic • Break the data into fields that are as small as usably possible • It’s easier to search for information when the data are in their own fields • In MS Access, it’s easier to fuse two pieces of data into one than the other way around
Rule 2: Avoid Field Repetition • This rule helps to achieveFirst Normal Form • In most cases of field repetition, the number of fields that may eventually be required is usually unknown.
Rule 2: Avoid Field Repetition • Fields that are repeated may make you set aside memory that you never fill with data • Fields that are repeated have to be searched on individually, increasing the demands on a data search • Separate repeating fields into their own table, unifying the fields in the process
Rule 3: Avoid Data Repetition • This rule helps to achieveSecond Normal Form • When data entry is repeated, it’s an indication that the information should be consolidated into a single reference point • The reference point for the consolidated data is that row’s Primary Key
Rule 4: Make Primary KeysShort and Stable • Primary Keys should be short because they are used for searching through records and identifying data • Primary Keys should be stable because changes made to Primary Key data have to be propagated to matching Foreign Keys
Rule 5: Maintain Table RelevanceRule 6: Maintain Field Independence • These rule helps to achieveThird Normal Form • Each of your tables should represent a single entity, that is, provide information on a single subject • The entity should be represented by a primary key
Rule 5: Maintain Table RelevanceRule 6: Maintain Field Independence