Introduction to Data Models and Geodatabases Steve Grisé UC2008 Pre-conference Seminars 1 Geodatabases • More closely represent real world objects than previous GIS data models • Provide a starting point for more sophisticated data models based on a more natural approach • Rely on geography and rules to define relationships, not just primary and foreign keys • Users and Programmers don’t need to manage atomic data elements/topology, they manage the objects and relationships instead Feature RoadSegment RoadSegID FullStreetName RoadClassification ... UC2008 Pre-conference Seminars 2 Inside the Geodatabase Feature dataset Tables, subtypes Feature classes, subtypes Polygon Polygon Route Line Line Annotation Point Points Dimension Annotation Attributes Representations Raster datasets Terrain datasets Relationship classes Network datasets Geometric networks Validation rules Topology Default values Attribute domains Split/Merge policy Connectivity rules Relationship rules Topology rules UC2008 Pre-conference Seminars 3 Geodatabase Options • ArcGIS Server includes ArcSDE • Workgroup Geodatabases ArcGIS – SQL Express • File Geodatabase ArcSDE – Fast – Cross Platform • Personal Geodatabase – MS Access – SQL Express Enterprise GDB Workgroup GDB Personal GDB File GDB Embedded Database Engine UC2008 Pre-conference Seminars 4 Geodatabase Datasets Surveys Networks Addresses Vectors Annotation 3D Objects Attributes Topology Dimensions Cadastral Terrain Cartography CAD Images UC2008 Pre-conference Seminars 5 Objects and Object Classes • Objects are entities with properties and behavior. • 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. A row stores an Object A table stores an ObjectClass UC2008 Pre-conference Seminars 6 Features and Feature Classes • Builds on the Relational Model • A feature is a spatial object. • A feature is an instance of a feature class. • Extended the relational model with – Geometry attribute types A feature class is a table of rows, where each row has a geographic column UC2008 Pre-conference Seminars 7 Geodatabase Supports Advanced Geometry • Points, lines, polygons, text, and surfaces • Single and multipart features • Flexible coordinates • XY, Z, M, True Curves • Continuous coverage (not tiled) One record in feature class table Feature with many parts UC2008 Pre-conference Seminars 8 Feature Datasets Subdivision • A container for feature classes with the same spatial reference • Analogous to a coverage – Less restrictive • Contain geometric networks and topologies – Optionally relationship classes ParcelCorner Parcel ParcelAnno LotLines Parcel_Topo LotDimension BoundaryLine UC2008 Pre-conference Seminars 9 Domains • Describe the legal values of a field type. – Used to ensure attribute integrity • Can be shared among classes • Transfer with the geodatabase • Types of domains: – Range - A tree can have a height between 0 and 300 feet. - A road can have between one and eight lanes. – Coded value (e.g., a set) - A tree can be of type oak, redwood, or palm. - A road can be made of dirt, asphalt, or concrete. UC2008 Pre-conference Seminars 10 Subtypes • Partition the objects in a class into like groups. • Defined by the value of a subtype field. – Have the same attribute schema – Have the same behavior schema – Can have different default values and domains for each field – Can define topology rules between subtypes Descriptions Codes UC2008 Pre-conference Seminars 11 Relationship Classes • An association between two object classes. – A class may participate in multiple relationship classes. • Related objects can message each other. – Origin to destination, destination to origin, both, neither. – Can trigger behavior (cascade delete, move to follow, custom, etc.) • Associate rules with relationship classes. UC2008 Pre-conference Seminars 12 Annotation • An example of a graphic feature class • Annotation feature classes may be – Feature linked – Non-feature linked • Composite relationship manages link • Can store text as well as other graphics – Lines, arrows, boxes, etc. • Maplex labeling integrated into ArcGIS Placerville feature class composite relationship class annotation feature class Sacramento Topanga Canyon 41 21 43 47 49 23 27 41 92 Placerville 43 92 94 94 Sacramento 47 95 95 Topanga Canyon UC2008 Pre-conference Seminars 13 Dimension Features • Type of annotation that displays specific distances on a map • Graphic features stored in a dimension feature class • “Smart” feature – Special drawing – Special editing 1 3/8" UC2008 Pre-conference Seminars 14 Object Behavior Class extensions Rules Subtypes Domains Datasets UC2008 Pre-conference Seminars 15 Role of Data Model Templates UC2008 Pre-conference Seminars 16 ArcGIS Data Models Templates for Many Fields • • • • • • • • • • • • • • • • Groundwater • Health • Historic Preservation & Archaeology • Homeland Security • Hydro • IHO - Navigation • Land Parcels • Local Government • Marine • National Cadastre • Petroleum • Pipeline • Telecommunications • Transportation • Water Utilities Address Agricultural Atmospheric Base Map Biodiversity Building Interior Spaces Census-Admin Boundaries Defense-Intel Energy Utilities Environmental Fire Service Forestry Geology GIS For The Nation Geometry Point Contains M values No Contains Z values No Simple feature class Haul Allow Data type nulls Field name OBJECTID SHAPE HAULJOIN VESSELCODE CRUISE HAUL STATION_ID SSTEMP BOTTOMTEMP EFFORT DataSourceID Object ID Geometry Long integer Long integer Long integer Long integer String Float Float Float String Default value Domain Precision Scale Length Yes No No No No No No No No Yes Arc Hydro 0 0 0 0 7 0 0 0 0 0 0 50 Table FishCatch Relationship class HaulHasFishCatch Type Simple Cardinality One to many Notification None Origin feature class Name Haul Primary key HAULJOIN Foreign key HAULJOIN Forward label FishCatch Backward label Haul No relationship rules defined. Relationship class DataSourceHasHaul Type Simple Cardinality One to many Notification None Origin table Name DataSource Primary key DataSourceID Foreign key DataSourceID Forward label Haul Backward label DataSource NameHaul Object ID Long integer Long integer String String Double Double Default value Domain No No No No No No Precision Scale Length 0 0 28 21 0 0 0 0 Table DataSource Field name Destination feature class No relationship rules defined. Allow Data type nulls Field name OBJECTID HAULJOIN SPECIESCODE LATINNAME COMMONNAME WEIGHTCPUE NUMBERCPUE Destination table NameFishCatch OBJECTID DESC_ SOURCE CONTACT PREC CREATE_DATE LAST_UPDATED DataSourceID Allow Data type nulls Object ID String String String String Long integer Long integer String Yes Yes Yes Yes Yes Yes Yes Default value Domain Precision Scale Length 35 35 20 20 0 0 50 . . . Help Users Get Started . . . Support Standards UC2008 Pre-conference Seminars 17 Architectural Direction – n Tier, Server-Based 3-D Viewers Presentation Tier (multiple viewers) COP 2-D Viewers Network/Enterprise Service Bus Catalog Services Globe Services GeoImageMap & Processing Processing Chart Services Services Services Open Web Services Tracking Services Serving/ Publishing Tier Authoring Tier UC2008 Pre-conference Seminars 18