a small exercise in normal forms - gis courses€¦ · normal forms summary no repeat columns...
TRANSCRIPT
![Page 1: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/1.jpg)
A Small Exercise in
Normal Forms
![Page 2: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/2.jpg)
Maple without Worms
![Page 3: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/3.jpg)
Maple with Worms
![Page 4: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/4.jpg)
Study to identify the cause and extent of exotic earthworm infestations
• Many sample sites, 10 meters in diameter, over a range of conditions. The worms present were counted and identified by species. GPS location was taken along with the type of soil, amount/depth of forest litter and vegetation at each sample site is also noted.
• 5 different Earthworm species are found in varying amounts at each site
• These data were organized in an attribute data file associated with each sampling point
Earthworm Invasions
![Page 5: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/5.jpg)
Exotic Earthworm StudyNon-normalized Form
Site Table
Repeat columns
![Page 6: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/6.jpg)
Normal Forms Summary
No repeat columns (create new records such that there are multiple records per entry)
Split the tables, so that all non-key attributes depend on a primary key.
Split tables further, if there are transitive functional dependencies. This results in tables with a single, primary key per table.
![Page 7: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/7.jpg)
Un-normalized File
Class Exercise Only (not to be turned in)
Retain for Exam Study
![Page 8: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/8.jpg)
You remove duplicate columns to create a 1st normal form
![Page 9: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/9.jpg)
1st normal form – no repeat columns
![Page 10: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/10.jpg)
2nd normal formFunctional Dependencies
Break up the 1st normal table. Retain the Site/Species/Count table and create a second table with eight items, using Site as the primary key and removing the dependent items from the 1st NF table
Site/Species/CountTable
Site Table
![Page 11: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/11.jpg)
2nd normal formFunctional Dependencies
Break up the 1st normal table. Retain the Site/Species/Count table and create a second table with eight items, using Site as the primary key and removing the dependent items from the 1st NF table
Site/Species/CountTable
Site Table
![Page 12: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/12.jpg)
2nd normal formFunctional Dependencies,
Site -> East, North, Vegcode, Vegetation, soil, description, litter
So I make a second table with these eight items, with Site as the primary key and remove the dependent items from the 1st NF table
Site table
![Page 13: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/13.jpg)
3nd normal form - Transitive Functional Dependencies
Veg-code -> VegetationSoil -> Description
Split the 2nd normal table these into several tables, and removing the transitively dependent columns from the site table.
Veg Table
Soil Table
Site/CodeTable
Site/Species/CountTable
![Page 14: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/14.jpg)
3nd normal form - Transitive Functional Dependencies
Veg-code -> Vegetation
Soil -> DescriptionSo split these into their own tables, and remove the transitively dependent columns from the site table, above
Site/CodeTabl
e
Vegetation Table
Soil Table
![Page 15: A Small Exercise in Normal Forms - GIS Courses€¦ · Normal Forms Summary No repeat columns (create new records such that there are multiple records per entry) Split the tables,](https://reader034.vdocuments.us/reader034/viewer/2022042323/5f0de01e7e708231d43c8448/html5/thumbnails/15.jpg)
Exotic Earthworm Study 3rd Normal Form
Site/Code Table
Vegetation Table
Site/ Species/
CountTable
Soil Table