0% found this document useful (0 votes)
89 views

Programming07 Handout 112 PDF

The document discusses database normalization. It describes functional dependencies and how they relate fields in a database. There are three main types of normalization forms - first normal form eliminates repeating groups, second normal form removes partial dependencies, and third normal form removes transitive dependencies. The goals of normalization are to eliminate data redundancy and anomalies that could occur from data changes. Further normal forms like BCNF and 3NF are discussed as well.

Uploaded by

Chad Jamias
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

Programming07 Handout 112 PDF

The document discusses database normalization. It describes functional dependencies and how they relate fields in a database. There are three main types of normalization forms - first normal form eliminates repeating groups, second normal form removes partial dependencies, and third normal form removes transitive dependencies. The goals of normalization are to eliminate data redundancy and anomalies that could occur from data changes. Further normal forms like BCNF and 3NF are discussed as well.

Uploaded by

Chad Jamias
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

SH1680

Normalization
I. Functional Dependency
 It describes the relationship between fields (columns) in a table.
 It is a constraint between two (2) sets of fields from the database.
 Any field or attribute that provides functional dependency to another field is called the
determinant.

A. Classifications of Functional Dependency


 Full Functional Dependency indicates that if A and B are fields of a table, B is
functionally dependent on A if B “is functionally dependent on A, but not on any
proper subset of A”.
 Partial Functional Dependency indicates that if A and B are attributes of a table,
B is partially dependent on A if there is some attribute that can be removed from A
and yet the dependency still holds.
 Transitive Functional Dependency is a condition where A, B and C are attributes
of a table such that, if A is functionally dependent on B and B is functionally
dependent on C, then C is transitively dependent on A via B.

II. Database Normalization


 This is the process of organizing data to minimize redundancy in the design of a
relational database management system (RDBMS).
 It is a series of recommended steps taken to remove redundancy and update
anomalies from a database design.
 This is a specific process that allows designers to turn unstructured data into a properly
designed set of tables and data elements.

A. Goals of Normalization
 Eliminate data redundancy. This is important because when data is repeated,
changes to particular values will affect multiple rows rather than just one.
 Eliminate insert, delete, and update anomalies. This is important because one
change, no matter how small (such as a single letter or a numerical value), will
affect a large amount of data rather than just one.

B. The Three (3) Main Rules for Normalizing Data


 To eliminate repeating data – This rule disallows multivalued attributes. For
instance, a data value holding two (2) values should not be allowed to exist in a
field. Multiple values in a single cell will obviously create difficulties in retrieving
data by any specified value.
 To eliminate partial dependencies – This refers to situations where the primary
key for a table is a composite primary key which means “a key composed of
multiple columns”. This rule states that no column in the table can be related only
to a part of the primary key.

07 Handout 1 *Property of STI


Page 1 of 3
SH1680

 To eliminate transitive dependencies – This refers to situations wherein a


column in the table refers to a non-key column instead of referring to the primary
key of a table.

III. Normal Forms

A. First Normal Form (1NF)


 This states that no table contains multiple columns can be used to get the same
information.
 Each table should be organized into rows, and each row should have a primary
key that distinguishes it as unique; there may be redundant information across
multiple rows, but each row will be unique.
 The primary key is usually a single column, but sometimes more than one column
can be combined to create a single primary key.

B. Second Normal Form (2NF)


 This states that relations be in 1NF with every non-key attribute fully dependent
on the primary key.
 It requires the primary key to be identified, as well as the relationship between parts
of the key and the data.
 It eliminates the problems of 1NF (such as partial dependencies) by splitting tables
with multiple data rows into independent tables.
 The split tables will use functional dependency via fields as foreign keys.
 Foreign keys are fields related to two (2) or more tables via functional dependency.

C. Third Normal Form (3NF)


 It states that relations be in 2NF with every non-key attribute non-transitively
(or directly) dependent on the primary key.
 Each column is directly dependent on the primary key while non-primary key
columns are not dependent on other non-primary key columns.
 It provides a cleaner and more organized presentation of information by providing
a unique key (via a primary key for a specific table of data) for each data row,
regardless if it has matching values or not.

D. Possible Forms After 3NF


 The Boyce-Codd Normal Form (BCNF) handles a problem with an entity that
might have two (2) primary keys.
 The Fourth Normal Form (4NF) is a normal form that can be achieved if a Multi-
Valued Dependency (MVD) exists in a table and all attributes of the table are also
functionally dependent on the determinant.
 The Fifth Normal Form (5NF), also known as the Projection-Join Normal
Form (PJ/NF), is a normal form that can be achieved if every join dependency
in the relation is a consequence of the candidate keys of the relation.

07 Handout 1 *Property of STI


Page 2 of 3
SH1680

References
 Coronel, C., Crockett, K., and Rob, P. (2012). Database systems: Design,
implementation & management. USA: Cengage Learning EMEA
 Singh, S. K. (2009). Database systems: Concepts, design and applications. India:
Pearson Education
 Adamski, J. and Pratt, P. (2012). Database management systems (7th ed.). USA:
Cengage Learning
 Elmarsi, R. and Navathe, S. (2010). Fundamentals of database systems (6th ed.).
Pearson Education South Asia Pte. Ltd.
 Rockoff, L. (2011). The language of SQL. Cengage Learning.
 Korth, H., Silberschatz, A., and Sudarshan, S. (2011). Database system concepts
(6th ed.). New York. McGraw-Hill.
 Green, David at Udemy Blog – Normalization in databases (with examples) (n.d.).
Retrieved on March 24, 2017 at https://blog.udemy.com/normalization-in-database-
with-example/.

07 Handout 1 *Property of STI


Page 3 of 3

You might also like