60 likes | 176 Views
Systems Analysis & Design Methods. 4 th normal form. Fourth Normal Form: no multi-valued dependencies.
E N D
Systems Analysis & Design Methods 4th normal form
Fourth Normal Form:no multi-valued dependencies Fourth normal form has to do with so-called multi-valued dependencies. When faced with a table that is in 1NF, 2NF and 3NF, but not in 4NF, the awkwardness of the table is emediately apparent. It is clear that the table contains information about 2 separate things. Imagine the following situation: • A student can follow 0,1 or more subjects. • A student can be involved in 0, 1 or more activities These two things have nothing in common. Yet, it is possible to construct a table that combines all this information and is still in normal forms 1,2 and 3. 4th normal form
Fourth Normal Form • Violation Example: 4th normal form
Fourth Normal Form • Remarks about the violating example: • Any combination of two fields is not enough to identify a record. The three fields are needed to form a primary key: (so we are definitely in 1NF, 2NF and 3 NF) • Yet there are apparent redundancies here: E.g. the fact that student 100 follows the Music course is recorded twice. So removing one of these facts would require removing 2 records. 4th normal form
Fourth normal form • Further remarks about the violating example: • Given a value of student id, there are multiple values of subject possible (multivalued). Also, given a value for studen_id, there are multiple possible values for activity. A multivalued dependency exists between columns A, B, and C if A is associated with multiple values of B and A is associated with multiple values of C, but B and C are unrelated. (In our example of course, A is student_id) 4th normal form
Fourth Normal Form • (Obvious )Solution: 4th normal form