10. Creating and Maintaining Geographic Databases
Transcript of 10. Creating and Maintaining Geographic Databases
![Page 1: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/1.jpg)
Geographic Information Systems and ScienceSECOND EDITIONPaul A. Longley, Michael F. Goodchild, David J. Maguire, David W. Rhind © 2005 John Wiley and Sons, Ltd
10. Creating and Maintaining Geographic Databases
![Page 2: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/2.jpg)
© 2005 John Wiley & Sons, Ltd
OutlineDefinitionsCharacteristics of DBMS
Types of databaseGeographic Extensions
Storing data in DBMS tablesSQLGeographic databases types and functionsGeographic database designStructuring geographic Information
TopologyIndexing methods
Editing and Data MaintenanceMulti-user EditingConclusions
![Page 3: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/3.jpg)
© 2005 John Wiley & Sons, Ltd
DefinitionsDatabase – an integrated set of data on a particular subjectGeographic (=spatial) database -database containing geographic data of a particular subject for a particular areaDatabase Management System (DBMS)– software to create, maintain and access databases
![Page 4: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/4.jpg)
© 2005 John Wiley & Sons, Ltd
Advantages of Databases over Files
Avoids redundancy and duplicationReduces data maintenance costsApplications are separated from the data
Applications persist over timeSupport multiple concurrent applications
Better data sharingSecurity and standards can be defined and enforced
![Page 5: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/5.jpg)
© 2005 John Wiley & Sons, Ltd
Disadvantages of Databases over Files
ExpenseComplexityPerformance – especially complex data typesIntegration with other systems can be difficult
![Page 6: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/6.jpg)
© 2005 John Wiley & Sons, Ltd
Types of DBMS ModelHierarchicalNetworkRelational - RDBMSObject-oriented - OODBMSObject-relational - ORDBMS
![Page 7: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/7.jpg)
© 2005 John Wiley & Sons, Ltd
Characteristics of DBMS (1)Data model support for multiple data types
e.g MS Access: Text, Memo, Number, Date/Time, Currency, AutoNumber, Yes/No, OLE Object, Hyperlink, Lookup Wizard
Load data from files, databases and other applicationsIndex for rapid retrieval
![Page 8: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/8.jpg)
© 2005 John Wiley & Sons, Ltd
Characteristics of DBMS (2)Query language – SQLSecurity – controlled access to data
Multi-level groupsControlled update using a transaction managerBackup and recoveryDBA tools
Configuration, tuning
![Page 9: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/9.jpg)
© 2005 John Wiley & Sons, Ltd
Characteristics of DBMS (3)Applications
CASE toolsForms builderReportwriterInternet Application Server
Programmable API
![Page 10: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/10.jpg)
© 2005 John Wiley & Sons, Ltd
Role of DBMS
![Page 11: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/11.jpg)
© 2005 John Wiley & Sons, Ltd
Relational DBMS (1)Data stored as tuples (tup-el), conceptualized as tablesTable – data about a class of objects
Two-dimensional list (array)Rows = objectsColumns = object states (properties, attributes)
![Page 12: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/12.jpg)
© 2005 John Wiley & Sons, Ltd
Relational DBMS (2)Most popular type of DBMS
Over 95% of data in DBMS is in RDBMS
Commercial systemsIBM DB2InformixMicrosoft AccessMicrosoft SQL ServerOracleSybase
![Page 13: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/13.jpg)
© 2005 John Wiley & Sons, Ltd
Table
Row = object
Column = property Table = Object Class
Object Classes withGeometry called Feature Classes
![Page 14: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/14.jpg)
© 2005 John Wiley & Sons, Ltd
Figure 10.2b
![Page 15: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/15.jpg)
© 2005 John Wiley & Sons, Ltd Figure 10.2c
![Page 16: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/16.jpg)
© 2005 John Wiley & Sons, Ltd
Figure 10.3A
02 1005425Residential211439110034 Endin MansionsSheila Sullivan674-113
2004 350000Residential2114392Hastings BarracksChris Capelli674-112
2004 450575Residential211439119 Big Bend BldSam Camarata670-231
2001 290000Commercial3114391452 Diamond PlazaD Widseler674 100
2000 275500Commercial3114391452 Diamond Plaza674-100
99 249000Commercial3114391Dave Widseler674-100
2003 545500Residential21143901115 Center PlaceJoel Campbell673-101
2002 220000Residential211439010 Railway CuttingsJeff Peters673/100
Date / AssessedValueZoningTypeZoningCodePostalCodeOwnerAddressOwnerNamParcelNumb
![Page 17: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/17.jpg)
© 2005 John Wiley & Sons, Ltd
Figure 10.3B
![Page 18: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/18.jpg)
© 2005 John Wiley & Sons, Ltd
Figure 10.3C
![Page 19: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/19.jpg)
© 2005 John Wiley & Sons, Ltd
Figure 10.3D Joined table
![Page 20: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/20.jpg)
© 2005 John Wiley & Sons, Ltd
Fig 10.4
![Page 21: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/21.jpg)
© 2005 John Wiley & Sons, Ltd
Relation Rules (Codd, 1970)Only one value in each cell (intersection of row and column)All values in a column are about the same subjectEach row is uniqueNo significance in column sequenceNo significance in row sequence
![Page 22: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/22.jpg)
© 2005 John Wiley & Sons, Ltd
NormalizationProcess of converting tables to conform to Codd’s relational rulesSplit tables into new tables that can be joined at query time
The relational joinSeveral levels of normalization
Forms: 1NF, 2NF, 3NF, etc.Normalization creates many expensive joinsDe-normalization is OK for performance optimization
![Page 23: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/23.jpg)
© 2005 John Wiley & Sons, Ltd
Relational JoinFundamental query operationOccurs because
NormalizationData created/maintained by different users, but integration needed for queries
Table joins use common keys (column values)Table (attribute) join concept has been extended to geographic case
![Page 24: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/24.jpg)
© 2005 John Wiley & Sons, Ltd
SQLStructured (Standard) Query Language –(pronounced SEQUEL)Developed by IBM in 1970sNow de facto and de jure standard for accessing relational databasesThree types of usage
Stand alone queriesHigh level programmingEmbedded in other applications
![Page 25: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/25.jpg)
© 2005 John Wiley & Sons, Ltd
Types of SQL StatementsData Definition Language (DDL)
Create, alter and delete dataCREATE TABLE, CREATE INDEX
Data Manipulation Language (DML)Retrieve and manipulate dataSELECT, UPDATE, DELETE, INSERT
Data Control Languages (DCL)Control security of dataGRANT, CREATE USER, DROP USER
![Page 26: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/26.jpg)
© 2005 John Wiley & Sons, Ltd
Geometry Class Hierarchy
![Page 27: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/27.jpg)
© 2005 John Wiley & Sons, Ltd
Spatial RelationsEquals – same geometriesDisjoint – geometries share common pointIntersects – geometries intersectTouches – geometries intersect at common boundaryCrosses – geometries overlapWithin– geometry withinContains – geometry completely containsOverlaps – geometries of same dimension overlapRelate – intersection between interior, boundary or exterior
![Page 28: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/28.jpg)
© 2005 John Wiley & Sons, Ltd
Two Possible Relations for Geographic Databases
![Page 29: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/29.jpg)
© 2005 John Wiley & Sons, Ltd
Spatial MethodsDistance – shortest distanceBuffer – geometric bufferConvexHull – smallest convex polygon geometryIntersection – points common to two geometriesUnion – all points in geometriesDifference – points different between two geometriesSymDifference – points in either, but not both of input geometries
![Page 30: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/30.jpg)
© 2005 John Wiley & Sons, Ltd
Examples of spatial analysis methods on geometries
![Page 31: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/31.jpg)
© 2005 John Wiley & Sons, Ltd
Four levels of data model available for use in GIS projects.
![Page 32: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/32.jpg)
© 2005 John Wiley & Sons, Ltd
Stages in Database Design
![Page 33: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/33.jpg)
© 2005 John Wiley & Sons, Ltd
TopologyTwo main database approaches
Normalized• Arc-node primitives
Physical• Simple features + rules
![Page 34: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/34.jpg)
© 2005 John Wiley & Sons, Ltd
Normalized Database Topology Model
![Page 35: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/35.jpg)
© 2005 John Wiley & Sons, Ltd
Physical Database Topology Model
![Page 36: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/36.jpg)
© 2005 John Wiley & Sons, Ltd
IndexingUsed to locate rows quicklyRDBMS use simple 1-d indexing (R-tree, B-tree, etc.)Spatial DBMS need 2-d, hierarchical indexing
GridQuadtreeR-treeOthers
Multi-level queries often used for performance (MBR)
![Page 37: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/37.jpg)
© 2005 John Wiley & Sons, Ltd
![Page 38: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/38.jpg)
© 2005 John Wiley & Sons, Ltd
Multi-level Grid Index
![Page 39: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/39.jpg)
© 2005 John Wiley & Sons, Ltd
Point Quadtree
![Page 40: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/40.jpg)
© 2005 John Wiley & Sons, Ltd
Region Quadtree
![Page 41: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/41.jpg)
© 2005 John Wiley & Sons, Ltd
Quadtree Search Order
![Page 42: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/42.jpg)
© 2005 John Wiley & Sons, Ltd
R-tree
![Page 43: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/43.jpg)
© 2005 John Wiley & Sons, Ltd
MBR
![Page 44: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/44.jpg)
© 2005 John Wiley & Sons, Ltd
Database transactions: (A) Linear short transactions; (B) Branching version tree
![Page 45: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/45.jpg)
© 2005 John Wiley & Sons, Ltd
Version Reconciliation
![Page 46: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/46.jpg)
© 2005 John Wiley & Sons, Ltd
Version tree showing database states for a Main Plant geographic database
![Page 47: 10. Creating and Maintaining Geographic Databases](https://reader030.fdocuments.in/reader030/viewer/2022021307/620754de49d709492c306169/html5/thumbnails/47.jpg)
© 2005 John Wiley & Sons, Ltd
SummaryDatabase – an integrated set of data on a particular subjectDatabases offer many advantages over filesRelational databases dominateSome limitations for GIS