Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008
-
Upload
marin-fotache -
Category
Data & Analytics
-
view
94 -
download
0
description
Transcript of Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008
![Page 1: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/1.jpg)
Marin Fotache, Catalin StrimbeiIBIMA2008
Back to Simplicity: An Old-Looking New Database Design
Methodology
![Page 2: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/2.jpg)
An “ancient” problemHow to design a database schema for a real-
world application ?Modeling, analysis & design approaches
E/RUnified Process (UML)Agile methodologiesEtc
Normalization
![Page 3: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/3.jpg)
Two methodologies of Normalization
Decomposition (Codd, 1972 & co)Splitting repeatedly the Universal Relation
into relations in order to remove partial and transitive functional dependencies, multivalued and join dependencies
1NF 2NF 3NF BCNF 4NF 5NF...
Synthesis (Bernstein, 1976)
![Page 4: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/4.jpg)
The proposed guide - pillars
Keeping some repeating groups and splitting the others
Functional dependenciesRemoving simmetrical FD’sUsing surrogate keys for:
Identification problemsTransforming MVDs
Inclusion dependencies (IS-A roles)Graphical representation
![Page 5: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/5.jpg)
A FD chart (graph)
![Page 6: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/6.jpg)
A simplified version of the chart
![Page 7: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/7.jpg)
Representing Inclusion Dependencies
![Page 8: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/8.jpg)
Comparison
![Page 9: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/9.jpg)
Surrogation for “fixing” the chart
![Page 10: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/10.jpg)
A “hard surrogation” case
![Page 11: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/11.jpg)
Accepting insular attributes
![Page 12: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/12.jpg)
BCNF transformation
![Page 13: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/13.jpg)
BCNF transformation - example
![Page 14: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/14.jpg)
Trick and surrogates
![Page 15: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/15.jpg)
(Another) Trouble with FDs
![Page 16: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/16.jpg)
A FD/IND based solution
![Page 17: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/17.jpg)
MVD’s – (a R.Fagin’s example)
Emp#
SpouseID
ChildID
Year
SalaryHireDate
EmpDept
PersNameYearOfBirth
![Page 18: Database normalization using dependencies graph fotache_m_strimbei_c__ibima2008](https://reader034.fdocuments.us/reader034/viewer/2022052601/558cfc9ad8b42a252d8b461d/html5/thumbnails/18.jpg)
Removing MVDs – two solutions