Presentation is loading. Please wait.

Presentation is loading. Please wait.

L9 – The GIS Database Part 2. Relational Databases The relational database model was defined by E.F. Codd. This is the most common database design due.

Similar presentations


Presentation on theme: "L9 – The GIS Database Part 2. Relational Databases The relational database model was defined by E.F. Codd. This is the most common database design due."— Presentation transcript:

1 L9 – The GIS Database Part 2

2 Relational Databases The relational database model was defined by E.F. Codd. This is the most common database design due to its flexibility, organization, and functioning. It can accommodate a wide range of data types. It is not necessary to know beforehand the types of processing that will be performed on the database. BUT it is not good for storing spatial data.

3 Spatial Data Spatial data has a structure that does not necessarily fit with tabular structure. To construct a spatial object requires several table joins. Spatial indexing is very different from the type of indexing used in a relational database.

4 Geometry PointCurve Surface LineString PolygonMultiSurface LineLinearRing MultiCurve MultiPolygonMultiLineString Composed Type Relationship SpatialReferenceSystem GeometryCollection MultiPoint Spatial Types – OGC Simple Features

5 File-based Data Models Coverages –Developed for workstation Arc/Info ~ 1980 –Complex structure, proprietary format –Attributes in Info tables Shapefiles –Developed for ArcView ~ 1993 –Simpler structure in public domain –Attributes in dBase (.dbf) tables Geographic coordinates and attributes are stored in separate but linked files Arc Info

6 Storing Data Coverages Shapefiles Maine Counties MCD Info Maine Counties.shp Counties.shx Counties.dbf MCD.shp MCDshx MCD.dbf

7 Coverages and Shapefiles –Coverages are stored partially in their own folder and partially in the common INFO folder. –Shapefiles are stored in three to five files (with extensions.shp,.shx,.dbf,.sbx and.sbn). –Coverages store common boundaries between polygons only once, to avoid redundancy. –Shapefiles store all the geometry of each polygon regardless of redundancy. –Coverage features are single lines or single polygons. –Shapefiles allow features to have multiple, disconnected, intersecting and overlapping components.

8 Geodatabase Model Stores geographic coordinates as one attribute (shape) in a relational database table Uses MS Access for “Personal Geodatabase” (single user) Uses Oracle, Sybase, Ingress or other commercial relational databases for “Enterprise Geodatabases” (many simultaneous users) Shape

9 There are some differences in queries between shapefiles and geodatabases –"STATE_NAME" LIKE 'Miss%' * in a geodatabase –"OWNER_NAME" LIKE '_atherine smith' ? –UPPER("LAST_NAME") = 'JONES' –UCASE ("LAST_NAME") = 'JONES' geodatabase –"POP2000" IS NULL –"POP2000" IS NOT NULL –"HOUSEHOLDS" > "MALES" * ("POP90_SQMI" + "AREA")

10 Geodatabase (JET Engine) Geodatabase (ORACLE) ArcCatalog / ArcMap / Custom Application GeoDataObjects SDESDE for Coverages ArcStorm MapLibrary Coverages Shapefiles Grids TINs Images Integration

11 Elements of a Geodatabase Feature Dataset Feature Class Relationship Class Geometric Network Annotation Class Object Class

12 Elements of a Geodatabase Objects, Object Classes Features, Feature Classes Feature Datasets Validation Rules, Domains Relationships, Relationship Classes Spatial References Geometric Networks

13 Objects and Object Classes An object is an instance of an object class All objects in an object class have the same properties and behavior An object can be related to other objects via relationships

14

15 Features Spatial object Location Attribute of type Geometry Spatial relationships Instance of a feature class

16 Feature Classes Same type of geometry Same type of spatial reference system Store spatial objects (features )

17 Feature Datasets Container Same spatial reference Analogous to a coverage

18 Object and Feature Behavior End users and data modelers can : Instantiate classes with predefined behavior Control the default value and acceptable values for any attribute in a class (domains) Partition the objects in a class into like groups (subtypes) Control the general and network relationships in which an object can participate Rule based, no programming required

19 Controlling and Specifying Object Behavior Custom Objects Subtype Specification Domains and Validation Rules Connectivity Rules Feature Type Selection Relationships

20 Validation Rules Attribute domains Connectivity rules Relationship rules... are stored in the Geodatabase Custom rules... are code based

21 Validation Rules The editor in ArcMap provides tools to test object validity Rules are evaluated, under user control, during object editing : –Create a new selection showing all invalid objects within a specified area –Restrict the current selection to invalid objects only

22 Domains A named set of acceptable values for a field Types of domains –Range –Coded values Can be shared across multiple object classes

23 Domains Split policies –Default value –Duplicate –Geometry ratio Merge policies –Default value –Sum values –Weighted average

24 Relationships Association between two objects The Geodatabase maintains the referential integrity of relationships when objects are deleted Related objects can message each other eg. move, rotate

25 Pole Attachments Composite relationship: pole to transformer Select a pole and move it …the transformer follows

26 Geometric Networks Models a network relationship between a set of feature classes Each feature class has a topological role in the network (junction or edge) A network may have multiple feature classes in the same topological role

27 Geometric Networks Lateral Service Main Feed Valve Feature Classes Geometric Network

28 Geometric Networks A geometric network and its feature classes must all belong to the same feature dataset

29 Feature Datasets and Geometric Networks Water FD = Feature Dataset GN = Geometric Network FC = FeatureClass OC = Object Class J = Junction E = Edge FD GN FC J JEEE Service Valve Main Lateral Feed

30 Network Model A geometric network has an associated logical network Network features are associated with logical network elements

31 Geometry and Connectivity Geometric network contains features and geometry Logical network contains elements and connectivity Connectivity established via geometric coincidence

32 Network Analysis Connectivity tracing Cycle detection Establishment of flow directions Upstream and downstream tracing Isolation tracing Trouble call tracing

33 Designing a Geodatabase Multiple Approaches Possible The ‘Build Using Existing Data’ approach The ‘Define in ArcCatalog’ approach The ‘Define Using CASE and UML’ approach

34 ‘Build Using Existing Data’ Approach Use ArcCatalog and ArcToolbox to load coverages and shapefiles Use ArcCatalog to refine and extend loaded feature classes –build network topology –add domains and rules

35 ‘Define in ArcCatalog’ Approach Use ArcCatalog to define new empty object classes. Define validation rules. Use the object editor and object loaders (in ArcMap) to populate your feature classes.

36 ‘Define Using UML / Case Tools’ Approach Use UML to define your domain object model, based on the generic Geodatabase object model. Use a UML Case Tool - eg. Visio, Rational Rose to specify the UML model. Supports the systematic design of large systems

37

38 Versionioning Named state of the database Multiple coexisting versions Differ in row state

39 Versioning Default version A user can work with any version Default: As Built User1User1 User2User2 User3User3 Version: Plan 1 User4User4 User5User5 Version: Design 1 User6User6 Version: Design 2 Electric Net

40 Multi User Editing Versioned Geodatabase Modify any version Only see your own changes Temporary child version When the Edit Session is saved the temporary version is posted

41 Direct Multi User Editing Editor A Editor B Editor C

42 Conflict Resolution Conflicting feature(s) Conflicting field Versions Conflicting FeatureClass Conflicts are automatically detected Options to resolve conflict

43 Indexed Files Indexing of a table speeds up data retrieval. The primary index is based on the key. Secondary indices may be created on other fields that are frequently accessed. –If primary key is ID number, you may want to build a secondary index on name.

44 Types of Spatial Indices Space Driven Indexes –e.g. quadtree Data Driven Indexes –e.g. R-Tree

45 Grid Index (multi-level)

46 Point and Region Quadtrees

47 Regular Grid Spatial Indexing

48 R-tree


Download ppt "L9 – The GIS Database Part 2. Relational Databases The relational database model was defined by E.F. Codd. This is the most common database design due."

Similar presentations


Ads by Google