SlideShare a Scribd company logo
Accessing and Administering your
 Enterprise Geodatabase through
         SQL and Python

        Brent Pierce @brent_pierce
     Russell Brennan @russellbrennan
             hashtag: #sqlpy
Assumptions



  •   Basic knowledge of SQL, Python and relational
      databases


  •   Basic knowledge of the Geodatabase


  •   We’ll hold all questions till end



             Please turn off cell phones
What is the Geodatabase?

 • A physical store of geographic data
     -   Scalable storage model supported on different platforms


 •   Core ArcGIS information model
     -   A comprehensive model for representing and managing
         GIS data
     -   Implemented as a series of simple tables


 •   A transactional model for managing GIS workflows


 •   Set of components for accessing data
Geodatabase is based on relational principles


 •   The geodatabase is built on an extended relational
     database
     -   Relational integrity
     -   Reliability, Flexibility, Scalability
     -   Supports continuous, large datasets
     -   Standard relational database schema
     -   Base short transaction model
     -   Supports structured query language (SQL)
Geodatabase is based on relational principles …

 •   Leverages key DBMS principles and concepts to
     store geographic data as tables in a DBMS
     -   Data is organized into tables
     -   Tables contain rows
     -   All rows in a table have the same attributes
     -   Each attribute has a type
     -   Relational integrity rules exist for tables
Geodatabase is based on relational principles …

 •   A feature class is stored as a simple DBMS table
 •   Each row represents a feature
 •   The fields in each row represent various
     characteristics or properties of the feature
 •   One of the fields holds the feature geometry which is
     stored as a spatial type
Geodatabase is based on relational principles …

 •   A feature class is stored as a simple DBMS table
 •   Each row represents a feature
 •   The fields in each row represent various
     characteristics or properties of the feature
 •   One of the fields holds the feature geometry which is
     stored as a spatial type
Geodatabase Schema

•   There are two sets of tables
    -   Dataset tables (user-defined tables)
    -   Geodatabase system tables




                                     System tables    XML



                                        User data
                                                     SQL type
User-defined tables

-   Stores the content of each dataset in the
    geodatabase
•   Datasets are stored in 1 or more tables
•   Spatial Types enhance the capabilities of the
    geodatabase
    -   SQL access to geometry
    -   Industry standard storage model and API



                                   System tables    XML



                                      User data
                                                   SQL type
Geodatabase system tables

•   System tables store definitions, rules, and behavior for
    datasets
•   Tracks contents within a geodatabase
•   4 primary tables
•   Geodatabase schema is stored within an XML field




                                System tables    XML



                                   User data
                                                SQL type
Geodatabase Schema…




                 System tables     XML



                      User data
                                  SQL type
Geodatabase Schema…




                  System tables    XML



                      User data
                                  SQL type
Geodatabase Schema…




                  System tables    XML



                      User data
                                  SQL type
Geodatabase Schema…




                  System tables    XML



                      User data
                                  SQL type
Geodatabase Schema…




                  System tables    XML



                      User data
                                  SQL type
What is a spatial type?

 •   A spatial type (ST_Geometry) is a type that stores
     geometry data in a single spatial attribute
     -   Geometry type, coordinates, dimension, spatial
         reference


 •   Spatial Index
     -   Access path for quick retrieval


 •   Relational and geometry operators and Functions
     -   Constructors
     -   Accessor
     -   Relational
     -   Geometry
What are the benefits of a spatial type?


 •   Efficiency
     -   Spatial data and methods are stored in the database
     -   Applications access native dbms type


 •   Accessed using common API’s and SQL
     -   C, C++, C#, Java
     -   Adheres to standards for SQL access
What are the benefits of a spatial type?

  •   Using SQL with a spatial type you can
      -   Create tables with a spatial attributes
      -   Read and analyze the spatial data
      -   Insert, update, and delete simple features

          Spatial Type                 SQL
Accessing Geodatabase through SQL

•   Access schema and properties of existing datasets
     -   Use SQL statements and XPath queries to query the definition
         attribute on the gdb_items table


•   Editing tables/feature classes, whether versioned or not
     -   Versioned classes are edited through versioned views


•   Create tables with SQL containing spatial types


•   Leverage SQL functions to evaluate attributes and spatial
    relationships, perform spatial operations, and return, set spatial
    properties
Accessing Geodatabase through SQL

•   With SQL accessing the data at the
    DBMS level
    -   Bypass behaviors and functionality     Python
        enforced by the geodatabase or
        ArcGIS clients
•   Need to be aware of what you can
                                               ArcGIS
    and cannot edit
    -   Relationship classes
    -   Geometric networks                                 SQL
                                             Geodatabase
    -   Topology…


                                               DBMS
Accessing Geodatabase through SQL

  •   One can use SQL to create, insert and update tables
      -   Need to register the table with the geodatabase to
          participate in geodatabase functionality


CREATE TABLE hazardous_sites
 (oid INTEGER NOT NULL, site_id INTEGER,
  name VARCHAR(40), location sde.st_geometry)



  •   Cannot modify schema of registered tables (i.e add a
      field) or create geodatabase items (i.e domains)
      through SQL
Accessing Geodatabase through SQL

•   Editing feature classes with SQL
     -   Points, lines, polygons (single or multipart)
     -   Ability to modify geometry when stored as a spatial type
     -   Without geodatabase behavior
          -   Not part of topology, geometric network, etc…

•   Editing tables/feature classes
     -   Use SQL statements
     -   Directly editing the database tables (no delta tables)
     -   Nonversioned editing in ArcGIS terminology
•   Editing versioned tables/feature classes
     -   Requires versioned views
Editing tables/feature classes

  •   Can use SQL to update, insert and delete data from
      tables that are not versioned
  •   Can leverage DBMS functionality
      -   Unique indexes, constraints, referential integrity, default
          values, triggers
  •   Requires a unique identifier (ObjectID) when
      inserting
      -   Used to uniquely identify rows in tables in a
          geodatabase
      -   Obtained from classes sequence or procedure
      -   Object ID is used by ArcGIS to do such things as display
          selection sets and perform identify operations on
          features
Editing versioned tables/feature classes

  •   Use versioned views
      -   Versioned Views are automatically created when class is
          registered as versioned


  •   Perform edits within the new version
  SELECT sde.sde_edit_version('WorkOrder1701',1);

      -   Unlike non-versioned editing, ObjectID values for new
          records are automatically generated
      -   Changes are made to the delta tables
      -   Versions must be reconciled through ArcGIS
Demo
Accessing a geodatabase through SQL
Geodatabase Administration
       with Python
                   Russell Brennan
Second Half Agenda


  •   Why use Python?
  •   Tips for using Python with geodatabases
  •   Demo: Creating geodatabase schema
  •   Demo: Performing geodatabase maintenance
  •   Demo: Publishing
Why use Python for Administration?


  •   Numerous tools available
      -   Schema creation and administration
      -   Maintenance
  •   Cross platform.
  •   Easy access to complex behavior.
  •   Easy to schedule tasks.
Using Python to access your geodatabase


  •   Connection files.
      -   Create Database Connection tool.
  •   Version access is defined in the connection file.
  •   Connected user is defined in the connection file.
  •   Multiple connections = multiple connection files.
Demo
Creating a Geodatabase
Demo 1: Creating a geodatabase


  •   Create an enterprise geodatabase.
  •   Create database roles.
  •   Create users.
  •   Create schema.
  •   Apply privileges.
  •   Register data as versioned.
  •   Create edit versions.
Demo
Performing maintenance
Demo 2: Geodatabase Maintenance


  •   Blocking and accepting connections
  •   Disconnecting users.
  •   Reconcile/Post versions
  •   Compress database
  •   Updating statistics and indexes
  •   Email notifications
  •   Scheduling
Demo
Publishing
Publishing


  •   Creating a script tool
  •   Publishing using the geoprocessing framework
  •   Consuming the tool
Slide Deck




  http://www.slideshare.net/brentpierce/enterprise-
     geodatabase-sql-access-and-administration
Thanks for attending
    Questions?

  Please fill out session surveys
www.esri.com/sessionevals

More Related Content

What's hot

5.2 Geoprocesamiento
5.2 Geoprocesamiento5.2 Geoprocesamiento
5.2 Geoprocesamiento
Miguelangel de la Cruz
 
Grass
GrassGrass
Arcgis training day_1
Arcgis training day_1Arcgis training day_1
Arcgis training day_1
yashasweesharma
 
Gis
GisGis
Commercially use GIS & REMOTE SENSING Software
Commercially use GIS & REMOTE SENSING SoftwareCommercially use GIS & REMOTE SENSING Software
Commercially use GIS & REMOTE SENSING Software
anuj4849
 
georeference
georeferencegeoreference
georeference
Thana Chirapiwat
 
Defination of gis and components of arc gis
Defination of gis and components of arc gisDefination of gis and components of arc gis
Defination of gis and components of arc gis
Sreedhar Siddhu
 
Arc gis introduction-ppt
Arc gis introduction-pptArc gis introduction-ppt
Arc gis introduction-ppt
Ashok Peddi
 
GIS - lecture-1.ppt
GIS - lecture-1.pptGIS - lecture-1.ppt
GIS - lecture-1.ppt
sapna kinattinkara
 
Querying the data and selecting features in ARC GIS
Querying the data and selecting features in ARC GISQuerying the data and selecting features in ARC GIS
Querying the data and selecting features in ARC GIS
KU Leuven
 
remote sensing
remote sensingremote sensing
remote sensing
Swapna Sawant-Narvekar
 
GIS
GISGIS
Learning assignment on geographic information system
Learning assignment on geographic information systemLearning assignment on geographic information system
Learning assignment on geographic information system
Muhammad Tahir Mehmood
 
GIS data structure
GIS data structureGIS data structure
GIS data structure
Thana Chirapiwat
 
Introduction and Application of GIS
Introduction and Application of GISIntroduction and Application of GIS
Introduction and Application of GIS
Satish Taji
 
Introduction to GIS systems
Introduction to GIS systemsIntroduction to GIS systems
Introduction to GIS systems
Vivek Srivastava
 
RADIOMETER AND BASICS OF SATELLITE COMMUNICATION SYSTEMS
RADIOMETER AND BASICS OF SATELLITE COMMUNICATION SYSTEMSRADIOMETER AND BASICS OF SATELLITE COMMUNICATION SYSTEMS
RADIOMETER AND BASICS OF SATELLITE COMMUNICATION SYSTEMS
ShivangiSingh241
 
GIS
GISGIS
Remote sensing and gis env bio
Remote sensing and gis  env bioRemote sensing and gis  env bio
Remote sensing and gis env bio
WISDOM WEALTH INTERNATIONAL SCHOOL, TAMILNADU
 
Presentation 2 rfid standards & protocols
Presentation 2 rfid standards & protocolsPresentation 2 rfid standards & protocols
Presentation 2 rfid standards & protocols
Mouhanad Alkhaldi
 

What's hot (20)

5.2 Geoprocesamiento
5.2 Geoprocesamiento5.2 Geoprocesamiento
5.2 Geoprocesamiento
 
Grass
GrassGrass
Grass
 
Arcgis training day_1
Arcgis training day_1Arcgis training day_1
Arcgis training day_1
 
Gis
GisGis
Gis
 
Commercially use GIS & REMOTE SENSING Software
Commercially use GIS & REMOTE SENSING SoftwareCommercially use GIS & REMOTE SENSING Software
Commercially use GIS & REMOTE SENSING Software
 
georeference
georeferencegeoreference
georeference
 
Defination of gis and components of arc gis
Defination of gis and components of arc gisDefination of gis and components of arc gis
Defination of gis and components of arc gis
 
Arc gis introduction-ppt
Arc gis introduction-pptArc gis introduction-ppt
Arc gis introduction-ppt
 
GIS - lecture-1.ppt
GIS - lecture-1.pptGIS - lecture-1.ppt
GIS - lecture-1.ppt
 
Querying the data and selecting features in ARC GIS
Querying the data and selecting features in ARC GISQuerying the data and selecting features in ARC GIS
Querying the data and selecting features in ARC GIS
 
remote sensing
remote sensingremote sensing
remote sensing
 
GIS
GISGIS
GIS
 
Learning assignment on geographic information system
Learning assignment on geographic information systemLearning assignment on geographic information system
Learning assignment on geographic information system
 
GIS data structure
GIS data structureGIS data structure
GIS data structure
 
Introduction and Application of GIS
Introduction and Application of GISIntroduction and Application of GIS
Introduction and Application of GIS
 
Introduction to GIS systems
Introduction to GIS systemsIntroduction to GIS systems
Introduction to GIS systems
 
RADIOMETER AND BASICS OF SATELLITE COMMUNICATION SYSTEMS
RADIOMETER AND BASICS OF SATELLITE COMMUNICATION SYSTEMSRADIOMETER AND BASICS OF SATELLITE COMMUNICATION SYSTEMS
RADIOMETER AND BASICS OF SATELLITE COMMUNICATION SYSTEMS
 
GIS
GISGIS
GIS
 
Remote sensing and gis env bio
Remote sensing and gis  env bioRemote sensing and gis  env bio
Remote sensing and gis env bio
 
Presentation 2 rfid standards & protocols
Presentation 2 rfid standards & protocolsPresentation 2 rfid standards & protocols
Presentation 2 rfid standards & protocols
 

Viewers also liked

Introducción a la geodatabase del SIOSE (II)
Introducción a la geodatabase del SIOSE (II)Introducción a la geodatabase del SIOSE (II)
Introducción a la geodatabase del SIOSE (II)
Benito Zaragozí
 
Ozri 2013 Brisbane, Australia - Geodatabase Efficiencies
Ozri 2013 Brisbane, Australia - Geodatabase EfficienciesOzri 2013 Brisbane, Australia - Geodatabase Efficiencies
Ozri 2013 Brisbane, Australia - Geodatabase Efficiencies
Walter Simonazzi
 
Null values, insert, delete and update in database
Null values, insert, delete and update in databaseNull values, insert, delete and update in database
Null values, insert, delete and update in database
Hemant Suthar
 
Using unique and unusual archival records and data to illustrate and annotate...
Using unique and unusual archival records and data to illustrate and annotate...Using unique and unusual archival records and data to illustrate and annotate...
Using unique and unusual archival records and data to illustrate and annotate...
ICARUS - International Centre for Archival Research
 
3D Web Services And Models For The Web: Where Do We Stand?
3D Web Services And Models For The Web: Where Do We Stand?3D Web Services And Models For The Web: Where Do We Stand?
3D Web Services And Models For The Web: Where Do We Stand?
Camptocamp
 
Standard_Digital_Cadastral_Maps_2015_Adopted
Standard_Digital_Cadastral_Maps_2015_AdoptedStandard_Digital_Cadastral_Maps_2015_Adopted
Standard_Digital_Cadastral_Maps_2015_Adopted
Michael Prestridge
 
Tips for Manipulating Data in Esri Geodatabase using FME
Tips for Manipulating Data in Esri Geodatabase using FME Tips for Manipulating Data in Esri Geodatabase using FME
Tips for Manipulating Data in Esri Geodatabase using FME
Safe Software
 
Curso de Geodatabase
Curso de Geodatabase Curso de Geodatabase
Curso de Geodatabase
Instituto Nacional de Tierras
 
Introducción a la geodatabase del SIOSE (I)
Introducción a la geodatabase del SIOSE (I)Introducción a la geodatabase del SIOSE (I)
Introducción a la geodatabase del SIOSE (I)
Benito Zaragozí
 
Digital cadaster in Bulgaria. Information system of cadaster and property reg...
Digital cadaster in Bulgaria. Information system of cadaster and property reg...Digital cadaster in Bulgaria. Information system of cadaster and property reg...
Digital cadaster in Bulgaria. Information system of cadaster and property reg...
Geoskills+ Project
 
Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2
Mohsen B
 
Graduate Research Thesis Defense Presentation
Graduate Research Thesis Defense Presentation  Graduate Research Thesis Defense Presentation
Graduate Research Thesis Defense Presentation
Johum Khushk
 
How to use R easily as GIS tools!
How to use R easily as GIS tools!How to use R easily as GIS tools!
How to use R easily as GIS tools!
Omar F. Althuwaynee
 
Survey camp ii
Survey camp iiSurvey camp ii
Survey camp ii
Draemmraj
 
Spatial Data in SQL Server
Spatial Data in SQL ServerSpatial Data in SQL Server
Spatial Data in SQL Server
Eduardo Castro
 
raster data model
raster data modelraster data model
raster data model
Riya Gupta
 
WHAT'S THERE IN GEOMATICS ENGINEERING???
WHAT'S THERE IN GEOMATICS ENGINEERING???WHAT'S THERE IN GEOMATICS ENGINEERING???
WHAT'S THERE IN GEOMATICS ENGINEERING???
Nepal Flying Labs
 
How to use Logistic Regression in GIS using ArcGIS and R statistics
How to use Logistic Regression in GIS using ArcGIS and R statisticsHow to use Logistic Regression in GIS using ArcGIS and R statistics
How to use Logistic Regression in GIS using ArcGIS and R statistics
Omar F. Althuwaynee
 
ppt spatial data
ppt spatial datappt spatial data
ppt spatial data
Rahul Kumar
 
Spatial vs non spatial
Spatial vs non spatialSpatial vs non spatial
Spatial vs non spatial
Sumant Diwakar
 

Viewers also liked (20)

Introducción a la geodatabase del SIOSE (II)
Introducción a la geodatabase del SIOSE (II)Introducción a la geodatabase del SIOSE (II)
Introducción a la geodatabase del SIOSE (II)
 
Ozri 2013 Brisbane, Australia - Geodatabase Efficiencies
Ozri 2013 Brisbane, Australia - Geodatabase EfficienciesOzri 2013 Brisbane, Australia - Geodatabase Efficiencies
Ozri 2013 Brisbane, Australia - Geodatabase Efficiencies
 
Null values, insert, delete and update in database
Null values, insert, delete and update in databaseNull values, insert, delete and update in database
Null values, insert, delete and update in database
 
Using unique and unusual archival records and data to illustrate and annotate...
Using unique and unusual archival records and data to illustrate and annotate...Using unique and unusual archival records and data to illustrate and annotate...
Using unique and unusual archival records and data to illustrate and annotate...
 
3D Web Services And Models For The Web: Where Do We Stand?
3D Web Services And Models For The Web: Where Do We Stand?3D Web Services And Models For The Web: Where Do We Stand?
3D Web Services And Models For The Web: Where Do We Stand?
 
Standard_Digital_Cadastral_Maps_2015_Adopted
Standard_Digital_Cadastral_Maps_2015_AdoptedStandard_Digital_Cadastral_Maps_2015_Adopted
Standard_Digital_Cadastral_Maps_2015_Adopted
 
Tips for Manipulating Data in Esri Geodatabase using FME
Tips for Manipulating Data in Esri Geodatabase using FME Tips for Manipulating Data in Esri Geodatabase using FME
Tips for Manipulating Data in Esri Geodatabase using FME
 
Curso de Geodatabase
Curso de Geodatabase Curso de Geodatabase
Curso de Geodatabase
 
Introducción a la geodatabase del SIOSE (I)
Introducción a la geodatabase del SIOSE (I)Introducción a la geodatabase del SIOSE (I)
Introducción a la geodatabase del SIOSE (I)
 
Digital cadaster in Bulgaria. Information system of cadaster and property reg...
Digital cadaster in Bulgaria. Information system of cadaster and property reg...Digital cadaster in Bulgaria. Information system of cadaster and property reg...
Digital cadaster in Bulgaria. Information system of cadaster and property reg...
 
Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2
 
Graduate Research Thesis Defense Presentation
Graduate Research Thesis Defense Presentation  Graduate Research Thesis Defense Presentation
Graduate Research Thesis Defense Presentation
 
How to use R easily as GIS tools!
How to use R easily as GIS tools!How to use R easily as GIS tools!
How to use R easily as GIS tools!
 
Survey camp ii
Survey camp iiSurvey camp ii
Survey camp ii
 
Spatial Data in SQL Server
Spatial Data in SQL ServerSpatial Data in SQL Server
Spatial Data in SQL Server
 
raster data model
raster data modelraster data model
raster data model
 
WHAT'S THERE IN GEOMATICS ENGINEERING???
WHAT'S THERE IN GEOMATICS ENGINEERING???WHAT'S THERE IN GEOMATICS ENGINEERING???
WHAT'S THERE IN GEOMATICS ENGINEERING???
 
How to use Logistic Regression in GIS using ArcGIS and R statistics
How to use Logistic Regression in GIS using ArcGIS and R statisticsHow to use Logistic Regression in GIS using ArcGIS and R statistics
How to use Logistic Regression in GIS using ArcGIS and R statistics
 
ppt spatial data
ppt spatial datappt spatial data
ppt spatial data
 
Spatial vs non spatial
Spatial vs non spatialSpatial vs non spatial
Spatial vs non spatial
 

Similar to Enterprise geodatabase sql access and administration

Sql Server2008
Sql Server2008Sql Server2008
Sql Server2008
Microsoft Iceland
 
Evolution of Esri Data Formats Seminar
Evolution of Esri Data Formats SeminarEvolution of Esri Data Formats Seminar
Evolution of Esri Data Formats Seminar
Esri South Africa
 
tw_242.ppt
tw_242.ppttw_242.ppt
tw_242.ppt
PokinMorakrant
 
Presentation MIG-T GeoPackage.pdf
Presentation MIG-T GeoPackage.pdfPresentation MIG-T GeoPackage.pdf
Presentation MIG-T GeoPackage.pdf
ssusera932351
 
Spatial Data in SQL Server
Spatial Data in SQL ServerSpatial Data in SQL Server
Spatial Data in SQL Server
Eduardo Castro
 
Bb geodatabase
Bb geodatabaseBb geodatabase
Bb geodatabase
Davinsworth09
 
FOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesFOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for Rookies
Todd Barr
 
Ch1.2_DB system Concepts and Architecture.pptx
Ch1.2_DB system Concepts and Architecture.pptxCh1.2_DB system Concepts and Architecture.pptx
Ch1.2_DB system Concepts and Architecture.pptx
01fe20bcv092
 
Query editor for multi databases
Query editor for multi databasesQuery editor for multi databases
Query editor for multi databases
Aarthi Raghavendra
 
Essentials of R
Essentials of REssentials of R
Essentials of R
ExternalEvents
 
Materi Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdfMateri Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdf
sakinatunnajmi
 
Cheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduceCheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduce
Tilani Gunawardena PhD(UNIBAS), BSc(Pera), FHEA(UK), CEng, MIESL
 
GIS.pdf
GIS.pdfGIS.pdf
Sqlite
SqliteSqlite
Sqlite
Kumar
 
Relational
RelationalRelational
Relational
dieover
 
SQL on Hadoop
SQL on HadoopSQL on Hadoop
SQL on Hadoop
Bigdatapump
 
Evolution of the Graph Schema
Evolution of the Graph SchemaEvolution of the Graph Schema
Evolution of the Graph Schema
Joshua Shinavier
 
Dv Analytics Course Contents
Dv Analytics Course Contents Dv Analytics Course Contents
Dv Analytics Course Contents
DV Analytics
 
Presentazione jrc 24 ottobre
Presentazione jrc 24 ottobrePresentazione jrc 24 ottobre
Presentazione jrc 24 ottobre
smespire
 
Database and Java Database Connectivity
Database and Java Database ConnectivityDatabase and Java Database Connectivity
Database and Java Database Connectivity
Gary Yeh
 

Similar to Enterprise geodatabase sql access and administration (20)

Sql Server2008
Sql Server2008Sql Server2008
Sql Server2008
 
Evolution of Esri Data Formats Seminar
Evolution of Esri Data Formats SeminarEvolution of Esri Data Formats Seminar
Evolution of Esri Data Formats Seminar
 
tw_242.ppt
tw_242.ppttw_242.ppt
tw_242.ppt
 
Presentation MIG-T GeoPackage.pdf
Presentation MIG-T GeoPackage.pdfPresentation MIG-T GeoPackage.pdf
Presentation MIG-T GeoPackage.pdf
 
Spatial Data in SQL Server
Spatial Data in SQL ServerSpatial Data in SQL Server
Spatial Data in SQL Server
 
Bb geodatabase
Bb geodatabaseBb geodatabase
Bb geodatabase
 
FOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesFOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for Rookies
 
Ch1.2_DB system Concepts and Architecture.pptx
Ch1.2_DB system Concepts and Architecture.pptxCh1.2_DB system Concepts and Architecture.pptx
Ch1.2_DB system Concepts and Architecture.pptx
 
Query editor for multi databases
Query editor for multi databasesQuery editor for multi databases
Query editor for multi databases
 
Essentials of R
Essentials of REssentials of R
Essentials of R
 
Materi Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdfMateri Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdf
 
Cheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduceCheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduce
 
GIS.pdf
GIS.pdfGIS.pdf
GIS.pdf
 
Sqlite
SqliteSqlite
Sqlite
 
Relational
RelationalRelational
Relational
 
SQL on Hadoop
SQL on HadoopSQL on Hadoop
SQL on Hadoop
 
Evolution of the Graph Schema
Evolution of the Graph SchemaEvolution of the Graph Schema
Evolution of the Graph Schema
 
Dv Analytics Course Contents
Dv Analytics Course Contents Dv Analytics Course Contents
Dv Analytics Course Contents
 
Presentazione jrc 24 ottobre
Presentazione jrc 24 ottobrePresentazione jrc 24 ottobre
Presentazione jrc 24 ottobre
 
Database and Java Database Connectivity
Database and Java Database ConnectivityDatabase and Java Database Connectivity
Database and Java Database Connectivity
 

Recently uploaded

GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

Enterprise geodatabase sql access and administration

  • 1. Accessing and Administering your Enterprise Geodatabase through SQL and Python Brent Pierce @brent_pierce Russell Brennan @russellbrennan hashtag: #sqlpy
  • 2. Assumptions • Basic knowledge of SQL, Python and relational databases • Basic knowledge of the Geodatabase • We’ll hold all questions till end Please turn off cell phones
  • 3. What is the Geodatabase? • A physical store of geographic data - Scalable storage model supported on different platforms • Core ArcGIS information model - A comprehensive model for representing and managing GIS data - Implemented as a series of simple tables • A transactional model for managing GIS workflows • Set of components for accessing data
  • 4. Geodatabase is based on relational principles • The geodatabase is built on an extended relational database - Relational integrity - Reliability, Flexibility, Scalability - Supports continuous, large datasets - Standard relational database schema - Base short transaction model - Supports structured query language (SQL)
  • 5. Geodatabase is based on relational principles … • Leverages key DBMS principles and concepts to store geographic data as tables in a DBMS - Data is organized into tables - Tables contain rows - All rows in a table have the same attributes - Each attribute has a type - Relational integrity rules exist for tables
  • 6. Geodatabase is based on relational principles … • A feature class is stored as a simple DBMS table • Each row represents a feature • The fields in each row represent various characteristics or properties of the feature • One of the fields holds the feature geometry which is stored as a spatial type
  • 7. Geodatabase is based on relational principles … • A feature class is stored as a simple DBMS table • Each row represents a feature • The fields in each row represent various characteristics or properties of the feature • One of the fields holds the feature geometry which is stored as a spatial type
  • 8. Geodatabase Schema • There are two sets of tables - Dataset tables (user-defined tables) - Geodatabase system tables System tables XML User data SQL type
  • 9. User-defined tables - Stores the content of each dataset in the geodatabase • Datasets are stored in 1 or more tables • Spatial Types enhance the capabilities of the geodatabase - SQL access to geometry - Industry standard storage model and API System tables XML User data SQL type
  • 10. Geodatabase system tables • System tables store definitions, rules, and behavior for datasets • Tracks contents within a geodatabase • 4 primary tables • Geodatabase schema is stored within an XML field System tables XML User data SQL type
  • 11. Geodatabase Schema… System tables XML User data SQL type
  • 12. Geodatabase Schema… System tables XML User data SQL type
  • 13. Geodatabase Schema… System tables XML User data SQL type
  • 14. Geodatabase Schema… System tables XML User data SQL type
  • 15. Geodatabase Schema… System tables XML User data SQL type
  • 16. What is a spatial type? • A spatial type (ST_Geometry) is a type that stores geometry data in a single spatial attribute - Geometry type, coordinates, dimension, spatial reference • Spatial Index - Access path for quick retrieval • Relational and geometry operators and Functions - Constructors - Accessor - Relational - Geometry
  • 17. What are the benefits of a spatial type? • Efficiency - Spatial data and methods are stored in the database - Applications access native dbms type • Accessed using common API’s and SQL - C, C++, C#, Java - Adheres to standards for SQL access
  • 18. What are the benefits of a spatial type? • Using SQL with a spatial type you can - Create tables with a spatial attributes - Read and analyze the spatial data - Insert, update, and delete simple features Spatial Type SQL
  • 19. Accessing Geodatabase through SQL • Access schema and properties of existing datasets - Use SQL statements and XPath queries to query the definition attribute on the gdb_items table • Editing tables/feature classes, whether versioned or not - Versioned classes are edited through versioned views • Create tables with SQL containing spatial types • Leverage SQL functions to evaluate attributes and spatial relationships, perform spatial operations, and return, set spatial properties
  • 20. Accessing Geodatabase through SQL • With SQL accessing the data at the DBMS level - Bypass behaviors and functionality Python enforced by the geodatabase or ArcGIS clients • Need to be aware of what you can ArcGIS and cannot edit - Relationship classes - Geometric networks SQL Geodatabase - Topology… DBMS
  • 21. Accessing Geodatabase through SQL • One can use SQL to create, insert and update tables - Need to register the table with the geodatabase to participate in geodatabase functionality CREATE TABLE hazardous_sites (oid INTEGER NOT NULL, site_id INTEGER, name VARCHAR(40), location sde.st_geometry) • Cannot modify schema of registered tables (i.e add a field) or create geodatabase items (i.e domains) through SQL
  • 22. Accessing Geodatabase through SQL • Editing feature classes with SQL - Points, lines, polygons (single or multipart) - Ability to modify geometry when stored as a spatial type - Without geodatabase behavior - Not part of topology, geometric network, etc… • Editing tables/feature classes - Use SQL statements - Directly editing the database tables (no delta tables) - Nonversioned editing in ArcGIS terminology • Editing versioned tables/feature classes - Requires versioned views
  • 23. Editing tables/feature classes • Can use SQL to update, insert and delete data from tables that are not versioned • Can leverage DBMS functionality - Unique indexes, constraints, referential integrity, default values, triggers • Requires a unique identifier (ObjectID) when inserting - Used to uniquely identify rows in tables in a geodatabase - Obtained from classes sequence or procedure - Object ID is used by ArcGIS to do such things as display selection sets and perform identify operations on features
  • 24. Editing versioned tables/feature classes • Use versioned views - Versioned Views are automatically created when class is registered as versioned • Perform edits within the new version SELECT sde.sde_edit_version('WorkOrder1701',1); - Unlike non-versioned editing, ObjectID values for new records are automatically generated - Changes are made to the delta tables - Versions must be reconciled through ArcGIS
  • 26. Geodatabase Administration with Python Russell Brennan
  • 27. Second Half Agenda • Why use Python? • Tips for using Python with geodatabases • Demo: Creating geodatabase schema • Demo: Performing geodatabase maintenance • Demo: Publishing
  • 28. Why use Python for Administration? • Numerous tools available - Schema creation and administration - Maintenance • Cross platform. • Easy access to complex behavior. • Easy to schedule tasks.
  • 29. Using Python to access your geodatabase • Connection files. - Create Database Connection tool. • Version access is defined in the connection file. • Connected user is defined in the connection file. • Multiple connections = multiple connection files.
  • 31. Demo 1: Creating a geodatabase • Create an enterprise geodatabase. • Create database roles. • Create users. • Create schema. • Apply privileges. • Register data as versioned. • Create edit versions.
  • 33. Demo 2: Geodatabase Maintenance • Blocking and accepting connections • Disconnecting users. • Reconcile/Post versions • Compress database • Updating statistics and indexes • Email notifications • Scheduling
  • 35. Publishing • Creating a script tool • Publishing using the geoprocessing framework • Consuming the tool
  • 36. Slide Deck http://www.slideshare.net/brentpierce/enterprise- geodatabase-sql-access-and-administration
  • 37. Thanks for attending Questions? Please fill out session surveys www.esri.com/sessionevals