1 / 19

NORMALISATION

NORMALISATION. Normal Forms: 1NF 2NF 3NF BCNF 4NF 5NF DKNF (only theoretical). 1 NF. A relation is said to be in 1nf if it has atomic values. MODIFICATION ANOMALIES. ACTIVITY (sid,activity,fee) key:sid INSERTION ANOMALIES DELETION ANOMALIES. FUNCTIONAL DEPENDENCIES.

chuck
Télécharger la présentation

NORMALISATION

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NORMALISATION • Normal Forms: • 1NF • 2NF • 3NF • BCNF • 4NF • 5NF • DKNF (only theoretical)

  2. 1 NF • A relation is said to be in 1nf if it has atomic values.

  3. MODIFICATION ANOMALIES • ACTIVITY (sid,activity,fee) • key:sid • INSERTION ANOMALIES • DELETION • ANOMALIES

  4. FUNCTIONAL DEPENDENCIES • BLOCK-NAMERENT • Determinant Sid (Block,Room) ACTIVITY  Fee X  (Y,Z) XY and XZ (X,Y)Z / XZ or YZ

  5. ACTIVITIES • KEY : (SID, Activity) • FDs : Activity  Fee A Relation with a Two-Attribute key (in 1NF but not in 2NF)

  6. 2NF • 1NF+ All non-key attributes are dependeb\nt on all of the key . Decomposition ACTIVITIES[SID,ACTIVITY] Act-Fee[Activity,Fee]

  7. A RELATION WITH TRANSITIVE DEPENDENCY • Key : SID • FDs : BuildingFee SIDBuildingFee

  8. Stu - hostel key : SID Bldg-Fee Key : Building ELIMINATION OF TRANSITIVE DEPENDENCY

  9. Relation in 3NF • ADVISOR • Key :( primary ) : (SID,Major) • Key :(Candidate) : (SID,Fname) • Functional Dependencies : FnameMajor

  10. Stu -Adv ($id, Fname) Key :SID Adv-sub Key : Fname Fname Major Relations in BCNF

  11. Relation with multivalued dependencies STUDENT • KEY(sid,major,activity) • multivalued sidmajor dependencies sid activity

  12. Insertion of a single tuple

  13. Insertion of two tuples

  14. stu-major key:sid,major stu-act Key:sid,activiy Elimination of MVDS

  15. Relation in 4nf • STUDENT • KEY:sid • FDS:sidshoe-size; sidmariatal-status • MVDS: sid shoe-size/ mariatal-status • 4nf if MVDS are implied by candidate keys of R

  16. 5NF • Every JD in R is implid by candidate keys of R. SPJ:

  17. SP: join over p# PJ: join over p#

  18. SPJ

  19. join over j#,s#original SPJ

More Related