Introduction to Spatial Databases and SQL
|
|
|
- Gwendoline Hamilton
- 10 years ago
- Views:
Transcription
1 Introduction to Spatial Databases and SQL Dylan E. Beaudette Natural Resources Conservation Service U.S. Deptartment of Agriculture California Soil Resource Lab (UC Davis) 13 April, 2011
2 Talk Outline 1 SQL Review History Basic Syntax Table Operations Joins 2 Spatial Databases: PostGIS OGC Simple Features GiST Spatial Index PostGIS Metadata Tables 3 Spatial SQL Points Lines Polygons 4 Data Import/Export 5 Examples Soil Texture Soil Water Storage
3 SQL 1 Structured Query Language History developed by IBM in the 70s interactive vocabulary for database queries most modern systems are built on the SQL-92 standard Modern Uses general purpose question asking vehicle SQL-based interfaces to many types of data: filesystem elements, GIS data, etc. often abstracted behind an interface of some kind: i.e. Google, etc. 1
4 Flavors of SQL / Portability Issues Many Vendors / Projects client/server: Oracle, MS SQL, Informix, IBM, MySQL, PostGreSQL file-based: Access, SQLite, BerkeleyDB...but all support a subset of the SQL standards Backwards Compatibility = Not Portable standard is vague on actual syntax complex & large standard only subset implemented historic deviations from standard preserved...in most cases the differences are slight
5 SQL Extensions Why Bother? The SQL language is great for simple set operations, but lacks many of the convenient functions found in other langauges. Extensions provide the ability to call external functions from other common programming languages, entirely within the context of the database. Some Examples procedural SQL : PL/SQL, SQL PL, PGPLSQL, etc. SQL/XML: parsing of XML (extensible markup language documents) SQL/R: use of R language commands (numerical algorithms, statistics, etc.) SQL/Perl: use of perl language commands libraries (pattern mataching, etc.) SQL/Python: use of python language commands and libraries
6 SQL Structured Query Language Syntax Notes set-based, declarative computer language i.e. a program that describes what to do, not how to do it 3-value logic: TRUE, FALSE, NULL several language elements: statements: SQL code that has a persistent effect on tables, etc. queries: SQL code that returns data expressions: operations on or tests against a column s contents clauses: logical chunks of statements / queries 2 2 image c/o wikipedia
7 SQL Syntax Syntax Notes SELECT [ columns ] [ FROM from item ] [ WHERE condition ] [ GROUP BY expression ] [ HAVING condition ] [ { UNION INTERSECT EXCEPT } SELECT [...] ] [ ORDER BY expression [ ASC DESC ] ] [ LIMIT count ] ; Example Query SELECT column x, column y, column z FROM table x WHERE column x = 'something' optional GROUP BY column x ORDER BY column x ; semi colon denotes end of SQL statement
8 Operations on a Single Table filtering by column: SELECT a, b, c,... filtering by row: WHERE ordering: ORDER BY aggregating: GROUP BY aggregating then filtering: GROUP BY, HAVING
9 INSERT/UPDATE/DELETE Statements INSERT records into a table INSERT INTO chorizon table name (cokey, hzname, hzdept r, hzdepb r) record template VALUES SQL keyword 'here comes the data' ('new cokey', 'Ap', 0, 10) a new record UPDATE existing records in a table UPDATE chorizon table to modify some records in SET hzname = 'E' update horizon names to modern conventions WHERE hzname = 'A2' ; but only the matching historic names DELETE records FROM a table (be careful!) DELETE FROM chorizon WHERE hzname IS NULL ; table to delete records from records that are missing a horizon name
10 Table Modification Statements 3 Altering Table Structure add a new column ALTER TABLE chorizon ADD COLUMN hydrophobicity index integer; now remove the column ALTER TABLE chorizon DROP COLUMN hydrophobicity index integer; Altering Column Definitions rename a column ALTER TABLE chorizon RENAME COLUMN claytotal r TO clay; change the column's datatype (be careful!) ALTER TABLE chorizon ALTER COLUMN clay TYPE numeric; do not allow NULL values in a column ALTER TABLE chorizon ALTER COLUMN clay SET NOT NULL; do not allow values over 100% ALTER TABLE chorizon ALTER COLUMN clay CHECK (clay <= 100) ; 3
11 Joining Tables Generic pattern for joining 2 tables SELECT [left hand table.columns], [right hand table.columns] FROM left hand table JOIN right hand table rule for aligning data from each table ON [join condition] optionaly do more stuff after the join is complete [WHERE clause] [GROUP BY clause] [ORDER BY clause] ;
12 Joins Types of Joins Cartiesian Join: not generally useful, returns all permutation of input rows Inner Join: most commonly used, returns rows that occur in both tables 1:1 rows missing from either table ommitted 1:many rows in the left-hand table repeated many:1 rows in the right-hand table repeated (LU table) Left Outer Join: returns all records from the left-hand table, despite missing records in the right-hand table 1:1,1:many,many:1 rows missing from right-hand table padded with NULL Right Outer Join: same as left outer join, but reversed 1:1,1:many,many:1 rows missing from left-hand table padded with NULL
13 Inner Join Join map unit data to component data (1:many) SELECT substr(muname, 0, 30) as muname, mapunit.mukey, cokey, compname, comppct r FROM mapunit JOIN component ON mapunit.mukey = component.mukey WHERE mapunit.mukey = '464463' ORDER BY comppct r DESC; Results muname mukey cokey compname comppct_r San Joaquin sandy loam, shall : San Joaquin 85 San Joaquin sandy loam, shall : Exeter 14 San Joaquin sandy loam, shall : Unnamed, ponded 1
14 Left-Outer Join Generate a listing of restrictive features for a single map unit SELECT mukey, component.cokey, compname, comppct r, reskind, reshard FROM component LEFT JOIN corestrictions ON component.cokey = corestrictions.cokey WHERE mukey = '464443' ORDER BY comppct r DESC; mukey cokey compname comppct_r reskind reshard : San Joaquin 85 Duripan Indurated : Exeter : Unnamed, ponded 1
15 Joins to Nested Sub-Queries SELECT mukey, mu area frac, taxgrtgroup, hd.cokey as id, top, bottom, prop FROM ( component weights, in the form of area fractions SELECT cd.mukey, cokey, taxgrtgroup, (comppct r::numeric / 100.0) mu area as mu area frac FROM ( component keys and percentages SELECT mukey, cokey, comppct r, taxgrtgroup from component where areasymbol = 'ca654' and taxgrtgroup is not NULL ) as cd JOIN ( map unit areas by mukey SELECT mukey, sum(st Area(wkb geometry)) as mu area from mapunit poly where areasymbol = 'ca654' group by mukey ) as mu areas on cd.mukey = mu areas.mukey ) as comp wts regular join will throw out all components without horizon data JOIN ( horizon level data SELECT cokey, hzdept r as top, hzdepb r as bottom, claytotal r as prop from chorizon where om r is not null and areasymbol = 'ca654' ) as hd on comp wts.cokey = hd.cokey ORDER BY mukey, id, top ASC;
16 What is PostGIS? PostgreSQL PostGIS Relational Database Management System (RDBMS) Scaleable to n processors, across m computers Support for very large data types and tables Open Source Spatial Extension to PostgreSQL Based on C library functions OGC Simple Feature Model Open Source (compare with $60K+/CPU for Oracle Spatial)
17 Why Should I Use PostGIS? 1 Scales well with massive datasets / file system objects 2 Familliar SQL-based manipulation of attribute and spatial features 3 Repeatable, transparent work-flow CREATE TABLE dwr.mapunit dau as SELECT m polys.areasymbol, m polys.mukey, d polys.dau id, ST Intersection(d polys.wkb geometry, m polys.wkb geometry) as wkb geometry FROM ( subset map unit polygons to certain survey areas s SELECT wkb geometry, areasymbol, mukey FROM mapunit poly results in map unit polygons WHERE areasymbol in ('ca653','ca654', 'ca113') ) as m polys JOIN ( subset DAU polygons that overlap with specific survey areas 512 ms SELECT dwr.dau.wkb geometry, dau.dau3 d id as dau id FROM dwr.dau JOIN mapunit bound poly results in 58 DAU polygons ON mapunit bound poly.areasymbol in ('ca653','ca654', 'ca113') and dwr.dau.wkb geometry && mapunit bound poly.wkb geometry ) as d polys join condition: only those polygons which completely intersect ON ST Intersects(d polys.wkb geometry, m polys.wkb geometry);
18 What Does PostGIS Look Like? psql command-line client
19 What Does PostGIS Look Like?
20 OGC Simple Feature Model The Standard Simple Features - not a topological format (i.e. GRASS or Coverage) 2D and 3D geometric primitives, without self-intersection Basic Geometries POINT (x y) LINESTRING (x 1 y 1, x 2 y 2, x 3 y 3,..., x n y n ) POLYGON (x 1 y 1, x 2 y 2, x 3 y 3,..., x n 1 y n 1, x 1 y 1 ); Multi- Geometries MULTIPOINT ((POINT 1 ),..., (POINT n ) ) MULTILINESTRING ((LINESTRING 1 ),..., (LINESTRING n ) ) MULTIPOLYGON ((POLYGON 1 ),..., (POLYGON n ) ) ;
21 SQL Review ANSI SQL Examples SELECTion SELECT a from b where c = d sorting SELECT a from b order by a desc join SELECT t1.a, t2.b from t1 join t2 on... aggregation SELECT sum(a)from b group by a OGC Spatial SQL Examples feature extraction SELECT ST X(point geom), ST Y(point geom)from... feature extraction SELECT PointN(geom)from... spatial join SELECT from t1 join t2 on ST Distance(t1.geom, t2.geom)< feature manipulation SELECT ST Transform(geom, SRID)from... feature analysis SELECT ST Buffer(geom, distance)from... GIS overlay functions SELECT ST Intersection(geom 1, geom 2)from...
22 Spatial SQL: Point Geometry Construction SELECT ST MakePoint(x,y) SELECT ST Centroid(polygon geom) SELECT ST PointOnSurface(polygon geom) Measurement SELECT ST X(geom), ST Y(geom) SELECT ST Distance(geom1, geom2) SELECT ST Distance Sphere(geom1, geom2) Geometric Operation SELECT ST Buffer(geom, distance) SELECT ST Expand(geom, distance) SELECT ST Touches(geom1, geom2)
23 Spatial SQL: Line Geometry Construction SELECT ST MakeLine(geometry collection) SELECT ST MakeLine(geom1, geom2) Measurement SELECT ST Length(geom) SELECT ST Length Spheroid(geom, spheroid) SELECT ST Length3d(geom) Geometric Operation SELECT ST Crosses(geom1, geom2) SELECT ST Overlaps(geom, distance) SELECT ST Intersection(geom1, geom2)
24 Spatial SQL: Polygon Geometry Construction SELECT ST ConvexHull(geometry collection) SELECT ST BuildArea(line geom) Measurement SELECT ST Area(geom) SELECT ST Perimeter(geom) Geometric Operation SELECT ST Intersection(geom, geom) SELECT ST Intersects(geom, geom) SELECT ST Contains(geom1, geom2)
25 Getting Data into and out of PostGIS OGR tools: recall order of OGR data sources: output input Import ogr2ogr -f "PostgreSQL" \ PG: dbname=ssurgo_combined user=xxxx password=xxxx host=host input_file.shp Export ogr2ogr output_file.shp \ PG: dbname=ssurgo_combined user=xxxx password=xxxx host=postgis.server.edu tablename Note the OGR syntax for specifying a PostGIS DSN. PostGIS Loader/Dumper Import shp2pgsql -s SRID -c -g wkb_geometry -I shapefile.shp schema.table \ psql -U username -h host database Export pgsql2shp -f shapefile.shp -h host -u username -P password -k -g wkb_geometry \ database schema.table See the manual page for pgsql2shp for a complete list of arguments.
26 Getting Data into and out of PostGIS Text Files CSV format, from within the psql client \copy tablename TO 'filename.csv'csv HEADER CSV format, via psql client echo select column list from table list psql tuples no align F, database > file.csv Tabular data to HTML format, via psql client See output below: echo select column list from table list psql html database > file.html area compname Hilmar variant Oneil Carranza Tuff rockland Gravel pits Snelling variant Foster Alamo Toomes Dumps
27 SSURGO Database Structure
28 Aggregation of SSURGO Geometry Query: extract SSURGO geom. from arbitrary bbox, compute area weights define a transformed bounding box for later use \set bbox ST Transform( ST SetSRID( ST MakeBox2D( ST MakePoint( , 39.28), ST MakePoint( , 39.30) ), 4326), 9001) select map unit keys, map unit symbols, and computed areas for the intersecting polygons SELECT mukey, sum(st Area(ST Intersection(wkb geometry, :bbox))) / ST Area(:bbox) as mu area wt from mapunit poly WHERE ST Intersects(wkb geometry, :bbox) GROUP BY mukey; mukey mu_area_wt
29 Soil Texture Example compute several weighted means of sand, silt, clay join with polygons, and compute areas weights SELECT mapunit poly.mukey, sum(st Area(wkb geometry)) / (SELECT ST Area(wkb geometry) FROM mapunit bound poly WHERE areasymbol = 'ca113') AS area wt, max(sand) as sand, max(silt) as silt, max(clay) as clay fake aggregate functions applied FROM mapunit poly JOIN ( compute component percent weighted mean SELECT mukey, sum(comppct r sand) / sum(comppct r) AS sand, sum(comppct r silt) / sum(comppct r) AS silt, sum(comppct r clay) / sum(comppct r) AS clay FROM component JOIN ( compute hz thickness weighted mean SELECT cokey, sum((hzdepb r hzdept r) sandtotal r) / sum(hzdepb r hzdept r) AS sand, sum((hzdepb r hzdept r) silttotal r) / sum(hzdepb r hzdept r) AS silt, sum((hzdepb r hzdept r) claytotal r) / sum(hzdepb r hzdept r) AS clay FROM chorizon GROUP BY cokey ) AS co agg ON component.cokey = co agg.cokey GROUP BY component.mukey ) AS mu agg ON mapunit poly.mukey = mu agg.mukey GROUP BY mapunit poly.mukey;
30 Soil Texture Example (cont.) Yolo County Soil Textures percent clay sandy clay sandy clay loam sandy loam 10 loamy sand sand clay clay loam loam silty clay 50 silty clay loam silt loam percent silt silt 90 percent sand
31 Soil Texture Example (cont.) # load some libs: library(plotrix) # read in the data x < read.csv('yolo texture.csv') # simple soil texture, with symbol size weighted by area weight soil.texture(x[,3:5], cex=sqrt(50 x$area wt), pch=16, col.symbol=rgb(65,105,225, alpha=100, max=255), show.lines=t, show.names=t, col.lines='black', col.names='black', main='yolo County Soil Textures') triax.points(cbind(weighted.mean(x$sand, x$area wt), weighted.mean(x$silt, x$area wt), weighted.mean(x $clay, x$area wt)), col.symbols='orange', pch=16, cex=2)
32 Soil Water Storage Computation SELECT mukey, compname, comppct r, a. FROM component JOIN ( SELECT cokey, sum( (hzdepb r hzdept r) awc r) AS component whc, sum((hzdepb r hzdept r)) AS depth FROM chorizon WHERE areasymbol = 'ca113' GROUP BY cokey ) AS a ON component.cokey = a.cokey WHERE component.areasymbol = 'ca113' ORDER BY mukey ; mukey compname comppct_r cokey component_whc depth Gravel pits : Arbuckle : Arbuckle : Arbuckle : Balcom : Balcom : Balcom : Balcom : Balcom :
33 Soil Water Storage Computation SELECT mukey, note that weights from non soil components must be removed otherwise, weighted mean values will be too low SUM(comppct r component whc) / SUM(comppct r) AS comppct weighted whc cm FROM component JOIN ( SELECT cokey, sum( (hzdepb r hzdept r) awc r) AS component whc, sum((hzdepb r hzdept r)) AS depth FROM chorizon WHERE areasymbol = 'ca113' GROUP BY cokey ) AS a USING (cokey) WHERE component.areasymbol = 'ca113' filter out components that are missing soils data AND a.component whc IS NOT NULL GROUP BY mukey ; mukey comppct_weighted_whc_cm
34 Soil Water Storage Computation create the new table with both geometry and attributes CREATE TABLE yolo whc AS SELECT ogc fid, wkb geometry AS wkb geometry, b.mukey, b.comppct weighted whc cm FROM mapunit poly use LEFT JOIN to include non soil polygons in the result set alternatively use JOIN to ignore non soil polygons LEFT JOIN ( SELECT mukey, note that weights from non soil components must be removed otherwise, weighted mean values will be too low SUM(comppct r component whc) / SUM(comppct r) AS comppct weighted whc cm FROM component JOIN ( SELECT cokey, sum( (hzdepb r hzdept r) awc r) AS component whc, sum((hzdepb r hzdept r)) AS depth FROM chorizon WHERE areasymbol = 'ca113' GROUP BY cokey ) AS a USING (cokey) WHERE component.areasymbol = 'ca113' filter out components that are missing soils data AND a.component whc IS NOT NULL GROUP BY mukey ) AS b JOIN constraint USING (mukey) optional constraint to limit geometry search in mapunit poly table WHERE mapunit poly.areasymbol = 'ca113' ; Create indexes and register the new geometry: create attribute and spatial index: CREATE UNIQUE INDEX yolo whc idx ON yolo whc (ogc fid) ; CREATE INDEX yolo whc spatial idx ON yolo whc USING gist (wkb geometry gist geometry ops); register in geometry columns table: INSERT INTO geometry columns VALUES ('','public','yolo whc','wkb geometry',2,9001,'polygon');
35 Soil Water Storage Computation
36 Additional Examples 1 simetaw work 2 soilweb 3 1km gridded soils data 4 PostGIS In Action Book 5 interactive examples 6 HRCLIM data: maybe for friday?
Oracle 10g PL/SQL Training
Oracle 10g PL/SQL Training Course Number: ORCL PS01 Length: 3 Day(s) Certification Exam This course will help you prepare for the following exams: 1Z0 042 1Z0 043 Course Overview PL/SQL is Oracle's Procedural
Relational Database: Additional Operations on Relations; SQL
Relational Database: Additional Operations on Relations; SQL Greg Plaxton Theory in Programming Practice, Fall 2005 Department of Computer Science University of Texas at Austin Overview The course packet
SQL - QUICK GUIDE. Allows users to access data in relational database management systems.
http://www.tutorialspoint.com/sql/sql-quick-guide.htm SQL - QUICK GUIDE Copyright tutorialspoint.com What is SQL? SQL is Structured Query Language, which is a computer language for storing, manipulating
Oracle SQL. Course Summary. Duration. Objectives
Oracle SQL Course Summary Identify the major structural components of the Oracle Database 11g Create reports of aggregated data Write SELECT statements that include queries Retrieve row and column data
COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries
COMP 5138 Relational Database Management Systems Week 5 : Basic COMP5138 "Relational Database Managment Systems" J. Davis 2006 5-1 Today s Agenda Overview Basic Queries Joins Queries Aggregate Functions
Geodatabase Programming with SQL
DevSummit DC February 11, 2015 Washington, DC Geodatabase Programming with SQL Craig Gillgrass Assumptions Basic knowledge of SQL and relational databases Basic knowledge of the Geodatabase We ll hold
ELECTRONIC JOURNAL OF POLISH AGRICULTURAL UNIVERSITIES
Electronic Journal of Polish Agricultural Universities (EJPAU) founded by all Polish Agriculture Universities presents original papers and review articles relevant to all aspects of agricultural sciences.
SQL Server. 2012 for developers. murach's TRAINING & REFERENCE. Bryan Syverson. Mike Murach & Associates, Inc. Joel Murach
TRAINING & REFERENCE murach's SQL Server 2012 for developers Bryan Syverson Joel Murach Mike Murach & Associates, Inc. 4340 N. Knoll Ave. Fresno, CA 93722 www.murach.com [email protected] Expanded
Oracle Database 12c: Introduction to SQL Ed 1.1
Oracle University Contact Us: 1.800.529.0165 Oracle Database 12c: Introduction to SQL Ed 1.1 Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,
Oracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: 1.800.529.0165 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This course is designed to deliver the fundamentals of SQL and PL/SQL along
ICAB4136B Use structured query language to create database structures and manipulate data
ICAB4136B Use structured query language to create database structures and manipulate data Release: 1 ICAB4136B Use structured query language to create database structures and manipulate data Modification
Financial Data Access with SQL, Excel & VBA
Computational Finance and Risk Management Financial Data Access with SQL, Excel & VBA Guy Yollin Instructor, Applied Mathematics University of Washington Guy Yollin (Copyright 2012) Data Access with SQL,
Oracle Database: SQL and PL/SQL Fundamentals NEW
Oracle University Contact Us: + 38516306373 Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the
An Introduction to Open Source Geospatial Tools
An Introduction to Open Source Geospatial Tools by Tyler Mitchell, author of Web Mapping Illustrated GRSS would like to thank Mr. Mitchell for this tutorial. Geospatial technologies come in many forms,
Reading SSURGO Soils Data
Reading SSURGO Soils Data Downloading SSURGO data 1. Download. You could google SSURGO download, or just go to the Soil Data Mart: http://soildatamart.nrcs.usda.gov/ a. Select the state (must be California
DBMS / Business Intelligence, SQL Server
DBMS / Business Intelligence, SQL Server Orsys, with 30 years of experience, is providing high quality, independant State of the Art seminars and hands-on courses corresponding to the needs of IT professionals.
Oracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: +966 12 739 894 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training is designed to
Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification
Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 Outline More Complex SQL Retrieval Queries
D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:
D61830GC30 for Developers Summary Duration Vendor Audience 5 Days Oracle Database Administrators, Developers, Web Administrators Level Technology Professional Oracle 5.6 Delivery Method Instructor-led
MySQL for Beginners Ed 3
Oracle University Contact Us: 1.800.529.0165 MySQL for Beginners Ed 3 Duration: 4 Days What you will learn The MySQL for Beginners course helps you learn about the world's most popular open source database.
Downloading SSURGO Soil Data from Internet
Downloading SSURGO Soil Data from Internet Prepared by Venkatesh Merwade School of Civil Engineering, Purdue University [email protected] September 2012 Purpose The purpose of this exercise to demonstrate
SQL SUPPORTED SPATIAL ANALYSIS FOR WEB-GIS INTRODUCTION
SQL SUPPORTED SPATIAL ANALYSIS FOR WEB-GIS Jun Wang Jie Shan Geomatics Engineering School of Civil Engineering Purdue University 550 Stadium Mall Drive, West Lafayette, IN 47907 ABSTRACT Spatial analysis
Database Administration with MySQL
Database Administration with MySQL Suitable For: Database administrators and system administrators who need to manage MySQL based services. Prerequisites: Practical knowledge of SQL Some knowledge of relational
Introduction to SQL and SQL in R. LISA Short Courses Xinran Hu
Introduction to SQL and SQL in R LISA Short Courses Xinran Hu 1 Laboratory for Interdisciplinary Statistical Analysis LISA helps VT researchers benefit from the use of Statistics Collaboration: Visit our
Oracle Database 10g: Introduction to SQL
Oracle University Contact Us: 1.800.529.0165 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database technology.
Building a Spatial Database in PostgreSQL
Building a Spatial Database in PostgreSQL David Blasby Refractions Research [email protected] http://postgis.refractions.net Introduction PostGIS is a spatial extension for PostgreSQL PostGIS aims
SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.
SQL Databases Course by Applied Technology Research Center. 23 September 2015 This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases. Oracle Topics This Oracle Database: SQL
Structured Query Language (SQL)
Objectives of SQL Structured Query Language (SQL) o Ideally, database language should allow user to: create the database and relation structures; perform insertion, modification, deletion of data from
Lesson 15 - Fill Cells Plugin
15.1 Lesson 15 - Fill Cells Plugin This lesson presents the functionalities of the Fill Cells plugin. Fill Cells plugin allows the calculation of attribute values of tables associated with cell type layers.
Advanced SQL Queries for the EMF
Advanced SQL Queries for the EMF Susan McCusker, MARAMA Online EMF Resources: SQL EMF User s Guide https://www.cmascenter.org/emf/internal/guide.html EMF SQL Reference Guide https://www.cmascenter.org/emf/internal/sql_basics.
Databases 2011 The Relational Model and SQL
Databases 2011 Christian S. Jensen Computer Science, Aarhus University What is a Database? Main Entry: da ta base Pronunciation: \ˈdā-tə-ˌbās, ˈda- also ˈdä-\ Function: noun Date: circa 1962 : a usually
2874CD1EssentialSQL.qxd 6/25/01 3:06 PM Page 1 Essential SQL Copyright 2001 SYBEX, Inc., Alameda, CA www.sybex.com
Essential SQL 2 Essential SQL This bonus chapter is provided with Mastering Delphi 6. It is a basic introduction to SQL to accompany Chapter 14, Client/Server Programming. RDBMS packages are generally
Querying Microsoft SQL Server
Course 20461C: Querying Microsoft SQL Server Module 1: Introduction to Microsoft SQL Server 2014 This module introduces the SQL Server platform and major tools. It discusses editions, versions, tools used
Chapter 9 Joining Data from Multiple Tables. Oracle 10g: SQL
Chapter 9 Joining Data from Multiple Tables Oracle 10g: SQL Objectives Identify a Cartesian join Create an equality join using the WHERE clause Create an equality join using the JOIN keyword Create a non-equality
Introduction to PostGIS
Tutorial ID: IGET_WEBGIS_002 This tutorial has been developed by BVIEER as part of the IGET web portal intended to provide easy access to geospatial education. This tutorial is released under the Creative
Working with the Geodatabase Using SQL
An ESRI Technical Paper February 2004 This technical paper is aimed primarily at GIS managers and data administrators who are responsible for the installation, design, and day-to-day management of a geodatabase.
Introduction to SQL for Data Scientists
Introduction to SQL for Data Scientists Ben O. Smith College of Business Administration University of Nebraska at Omaha Learning Objectives By the end of this document you will learn: 1. How to perform
Oracle8i Spatial: Experiences with Extensible Databases
Oracle8i Spatial: Experiences with Extensible Databases Siva Ravada and Jayant Sharma Spatial Products Division Oracle Corporation One Oracle Drive Nashua NH-03062 {sravada,jsharma}@us.oracle.com 1 Introduction
GeoPackage, The Shapefile Of The Future
FOSS4G 2013 GeoPackage, The Shapefile Of The Future @PirminKalberer Sourcepole AG, Switzerland www.sourcepole.com About Sourcepole > QGIS > Core dev. & Project Steering Commitee > QGIS Server, Printing,
Appendix: National Value Added Look Up (valu) Table Database for gsurrgo Soil Data
Appendix: National Value Added Look Up (valu) Table Database for gsurrgo Soil Data 1 VALU Table Theme VALU Table Column Name _ short VALU Table Column Name _ long VALU Table Column Name Short Description
Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems
CSC 74 Database Management Systems Topic #0: SQL Part A: Data Definition Language (DDL) Spring 00 CSC 74: DBMS by Dr. Peng Ning Spring 00 CSC 74: DBMS by Dr. Peng Ning Schema and Catalog Schema A collection
Frank Warmerdam President, OSGeo
PostGIS: A Standards Based Geographic Extension for PostgreSQL Frank Warmerdam President, OSGeo 1 Overview Brief background PostGIS Details PostGIS Ex am ples Survey of Sim ple Features 1.1 Geom etries
BIG DATA HANDS-ON WORKSHOP Data Manipulation with Hive and Pig
BIG DATA HANDS-ON WORKSHOP Data Manipulation with Hive and Pig Contents Acknowledgements... 1 Introduction to Hive and Pig... 2 Setup... 2 Exercise 1 Load Avro data into HDFS... 2 Exercise 2 Define an
Instant SQL Programming
Instant SQL Programming Joe Celko Wrox Press Ltd. INSTANT Table of Contents Introduction 1 What Can SQL Do for Me? 2 Who Should Use This Book? 2 How To Use This Book 3 What You Should Know 3 Conventions
The process of database development. Logical model: relational DBMS. Relation
The process of database development Reality (Universe of Discourse) Relational Databases and SQL Basic Concepts The 3rd normal form Structured Query Language (SQL) Conceptual model (e.g. Entity-Relationship
A Brief Introduction to MySQL
A Brief Introduction to MySQL by Derek Schuurman Introduction to Databases A database is a structured collection of logically related data. One common type of database is the relational database, a term
Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff
D80198GC10 Oracle Database 12c SQL and Fundamentals Summary Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff Level Professional Delivery Method Instructor-led
SQL. by Steven Holzner, Ph.D. ALPHA. A member of Penguin Group (USA) Inc.
SQL by Steven Holzner, Ph.D. A ALPHA A member of Penguin Group (USA) Inc. Contents Part 1: Mastering the SQL Basics 1 1 Getting into SQL 3 Understanding Databases 4 Creating Tables Creating Rows and Columns
Effective Use of SQL in SAS Programming
INTRODUCTION Effective Use of SQL in SAS Programming Yi Zhao Merck & Co. Inc., Upper Gwynedd, Pennsylvania Structured Query Language (SQL) is a data manipulation tool of which many SAS programmers are
Course ID#: 1401-801-14-W 35 Hrs. Course Content
Course Content Course Description: This 5-day instructor led course provides students with the technical skills required to write basic Transact- SQL queries for Microsoft SQL Server 2014. This course
SQL. Short introduction
SQL Short introduction 1 Overview SQL, which stands for Structured Query Language, is used to communicate with a database. Through SQL one can create, manipulate, query and delete tables and contents.
CSI 2132 Lab 3. Outline 09/02/2012. More on SQL. Destroying and Altering Relations. Exercise: DROP TABLE ALTER TABLE SELECT
CSI 2132 Lab 3 More on SQL 1 Outline Destroying and Altering Relations DROP TABLE ALTER TABLE SELECT Exercise: Inserting more data into previous tables Single-table queries Multiple-table queries 2 1 Destroying
Databases in Engineering / Lab-1 (MS-Access/SQL)
COVER PAGE Databases in Engineering / Lab-1 (MS-Access/SQL) ITU - Geomatics 2014 2015 Fall 1 Table of Contents COVER PAGE... 0 1. INTRODUCTION... 3 1.1 Fundamentals... 3 1.2 How To Create a Database File
Big Data: Using ArcGIS with Apache Hadoop. Erik Hoel and Mike Park
Big Data: Using ArcGIS with Apache Hadoop Erik Hoel and Mike Park Outline Overview of Hadoop Adding GIS capabilities to Hadoop Integrating Hadoop with ArcGIS Apache Hadoop What is Hadoop? Hadoop is a scalable
How To Create A Table In Sql 2.5.2.2 (Ahem)
Database Systems Unit 5 Database Implementation: SQL Data Definition Language Learning Goals In this unit you will learn how to transfer a logical data model into a physical database, how to extend or
Oracle Database 10g: Building GIS Applications Using the Oracle Spatial Network Data Model. An Oracle Technical White Paper May 2005
Oracle Database 10g: Building GIS Applications Using the Oracle Spatial Network Data Model An Oracle Technical White Paper May 2005 Building GIS Applications Using the Oracle Spatial Network Data Model
Database 10g Edition: All possible 10g features, either bundled or available at additional cost.
Concepts Oracle Corporation offers a wide variety of products. The Oracle Database 10g, the product this exam focuses on, is the centerpiece of the Oracle product set. The "g" in "10g" stands for the Grid
Course 20461C: Querying Microsoft SQL Server Duration: 35 hours
Course 20461C: Querying Microsoft SQL Server Duration: 35 hours About this Course This course is the foundation for all SQL Server-related disciplines; namely, Database Administration, Database Development
CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY
CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY 2.1 Introduction In this chapter, I am going to introduce Database Management Systems (DBMS) and the Structured Query Language (SQL), its syntax and usage.
Module 1: Getting Started with Databases and Transact-SQL in SQL Server 2008
Course 2778A: Writing Queries Using Microsoft SQL Server 2008 Transact-SQL About this Course This 3-day instructor led course provides students with the technical skills required to write basic Transact-
Netezza SQL Class Outline
Netezza SQL Class Outline CoffingDW education has been customized for every customer for the past 20 years. Our classes can be taught either on site or remotely via the internet. Education Contact: John
Querying Microsoft SQL Server Course M20461 5 Day(s) 30:00 Hours
Área de formação Plataforma e Tecnologias de Informação Querying Microsoft SQL Introduction This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL
Web Development using PHP (WD_PHP) Duration 1.5 months
Duration 1.5 months Our program is a practical knowledge oriented program aimed at learning the techniques of web development using PHP, HTML, CSS & JavaScript. It has some unique features which are as
14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:
14 Databases 14.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define a database and a database management system (DBMS)
Exploring Microsoft Office Access 2007. Chapter 2: Relational Databases and Multi-Table Queries
Exploring Microsoft Office Access 2007 Chapter 2: Relational Databases and Multi-Table Queries 1 Objectives Design data Create tables Understand table relationships Share data with Excel Establish table
MOC 20461C: Querying Microsoft SQL Server. Course Overview
MOC 20461C: Querying Microsoft SQL Server Course Overview This course provides students with the knowledge and skills to query Microsoft SQL Server. Students will learn about T-SQL querying, SQL Server
Writing Queries Using Microsoft SQL Server 2008 Transact-SQL
Course 2778A: Writing Queries Using Microsoft SQL Server 2008 Transact-SQL Length: 3 Days Language(s): English Audience(s): IT Professionals Level: 200 Technology: Microsoft SQL Server 2008 Type: Course
A Comparison of Database Query Languages: SQL, SPARQL, CQL, DMX
ISSN: 2393-8528 Contents lists available at www.ijicse.in International Journal of Innovative Computer Science & Engineering Volume 3 Issue 2; March-April-2016; Page No. 09-13 A Comparison of Database
HTSQL is a comprehensive navigational query language for relational databases.
http://htsql.org/ HTSQL A Database Query Language HTSQL is a comprehensive navigational query language for relational databases. HTSQL is designed for data analysts and other accidental programmers who
SUBQUERIES AND VIEWS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6
SUBQUERIES AND VIEWS CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6 String Comparisons and GROUP BY 2! Last time, introduced many advanced features of SQL, including GROUP BY! Recall:
Oracle Database: Introduction to SQL
Oracle University Contact Us: +381 11 2016811 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn Understanding the basic concepts of relational databases ensure refined code by developers.
Introducing Microsoft SQL Server 2012 Getting Started with SQL Server Management Studio
Querying Microsoft SQL Server 2012 Microsoft Course 10774 This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for Microsoft SQL Server
Query 4. Lesson Objectives 4. Review 5. Smart Query 5. Create a Smart Query 6. Create a Smart Query Definition from an Ad-hoc Query 9
TABLE OF CONTENTS Query 4 Lesson Objectives 4 Review 5 Smart Query 5 Create a Smart Query 6 Create a Smart Query Definition from an Ad-hoc Query 9 Query Functions and Features 13 Summarize Output Fields
Chapter 5 Spatial is not Special: Managing Tracking Data in a Spatial Database
Chapter 5 Spatial is not Special: Managing Tracking Data in a Spatial Database Ferdinando Urbano and Mathieu Basille Abstract A wildlife tracking data management system must include the capability to explicitly
Spatial data models (types) Not taught yet
Spatial data models (types) Not taught yet A new data model in ArcGIS Geodatabase data model Use a relational database that stores geographic data A type of database in which the data is organized across
Oracle Database: Introduction to SQL
Oracle University Contact Us: 1.800.529.0165 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn View a newer version of this course This Oracle Database: Introduction to SQL training
Guide to SQL Programming: SQL:1999 and Oracle Rdb V7.1
Guide to SQL Programming: SQL:1999 and Oracle Rdb V7.1 A feature of Oracle Rdb By Ian Smith Oracle Rdb Relational Technology Group Oracle Corporation 1 Oracle Rdb Journal SQL:1999 and Oracle Rdb V7.1 The
Relational Databases
Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 18 Relational data model Domain domain: predefined set of atomic values: integers, strings,... every attribute
10. Creating and Maintaining Geographic Databases. Learning objectives. Keywords and concepts. Overview. Definitions
10. Creating and Maintaining Geographic Databases Geographic Information Systems and Science SECOND EDITION Paul A. Longley, Michael F. Goodchild, David J. Maguire, David W. Rhind 005 John Wiley and Sons,
Database Systems. Lecture 1: Introduction
Database Systems Lecture 1: Introduction General Information Professor: Leonid Libkin Contact: [email protected] Lectures: Tuesday, 11:10am 1 pm, AT LT4 Website: http://homepages.inf.ed.ac.uk/libkin/teach/dbs09/index.html
Advance DBMS. Structured Query Language (SQL)
Structured Query Language (SQL) Introduction Commercial database systems use more user friendly language to specify the queries. SQL is the most influential commercially marketed product language. Other
MOC 20461 QUERYING MICROSOFT SQL SERVER
ONE STEP AHEAD. MOC 20461 QUERYING MICROSOFT SQL SERVER Length: 5 days Level: 300 Technology: Microsoft SQL Server Delivery Method: Instructor-led (classroom) COURSE OUTLINE Module 1: Introduction to Microsoft
Querying Microsoft SQL Server 20461C; 5 days
Lincoln Land Community College Capital City Training Center 130 West Mason Springfield, IL 62702 217-782-7436 www.llcc.edu/cctc Querying Microsoft SQL Server 20461C; 5 days Course Description This 5-day
Chapter 5. SQL: Queries, Constraints, Triggers
Chapter 5 SQL: Queries, Constraints, Triggers 1 Overview: aspects of SQL DML: Data Management Language. Pose queries (Ch. 5) and insert, delete, modify rows (Ch. 3) DDL: Data Definition Language. Creation,
Lecture 25: Database Notes
Lecture 25: Database Notes 36-350, Fall 2014 12 November 2014 The examples here use http://www.stat.cmu.edu/~cshalizi/statcomp/ 14/lectures/23/baseball.db, which is derived from Lahman s baseball database
Archival Challenges Associated with the Esri Personal Geodatabase and File Geodatabase Formats
Geospatial Multistate Archive and Preservation Partnership (GeoMAPP) Archival Challenges Associated with the Esri Personal Geodatabase and File Geodatabase Formats December 6, 2011 Introduction Spatial
SQL: joins. Practices. Recap: the SQL Select Command. Recap: Tables for Plug-in Cars
Recap: the SQL Select Command SQL: joins SELECT [DISTINCT] sel_expression [, sel_expression ] FROM table_references [WHERE condition] [GROUPBY column [,column ] [[HAVING condition]] [ORDER BY columns [ASC
Using AND in a Query: Step 1: Open Query Design
Using AND in a Query: Step 1: Open Query Design From the Database window, choose Query on the Objects bar. The list of saved queries is displayed, as shown in this figure. Click the Design button. The
Netezza Workbench Documentation
Netezza Workbench Documentation Table of Contents Tour of the Work Bench... 2 Database Object Browser... 2 Edit Comments... 3 Script Database:... 3 Data Review Show Top 100... 4 Data Review Find Duplicates...
Oracle Database 11g SQL
AO3 - Version: 2 19 June 2016 Oracle Database 11g SQL Oracle Database 11g SQL AO3 - Version: 2 3 days Course Description: This course provides the essential SQL skills that allow developers to write queries
Introduction to Microsoft Jet SQL
Introduction to Microsoft Jet SQL Microsoft Jet SQL is a relational database language based on the SQL 1989 standard of the American Standards Institute (ANSI). Microsoft Jet SQL contains two kinds of
Information Systems SQL. Nikolaj Popov
Information Systems SQL Nikolaj Popov Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria [email protected] Outline SQL Table Creation Populating and Modifying
Chapter 1 Overview of the SQL Procedure
Chapter 1 Overview of the SQL Procedure 1.1 Features of PROC SQL...1-3 1.2 Selecting Columns and Rows...1-6 1.3 Presenting and Summarizing Data...1-17 1.4 Joining Tables...1-27 1-2 Chapter 1 Overview of
Modern PL/SQL Code Checking and Dependency Analysis
Modern PL/SQL Code Checking and Dependency Analysis Philipp Salvisberg Senior Principal Consultant BASEL BERN BRUGG LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MUNICH STUTTGART VIENNA
EECS 647: Introduction to Database Systems
EECS 647: Introduction to Database Systems Instructor: Luke Huan Spring 2013 Administrative Take home background survey is due this coming Friday The grader of this course is Ms. Xiaoli Li and her email
VBA and Databases (see Chapter 14 )
VBA and Databases (see Chapter 14 ) Kipp Martin February 29, 2012 Lecture Files Files for this module: retailersql.m retailer.accdb Outline 3 Motivation Modern Database Systems SQL Bringing Data Into MATLAB/Excel
Writing Queries Using Microsoft SQL Server 2008 Transact-SQL
Lincoln Land Community College Capital City Training Center 130 West Mason Springfield, IL 62702 217-782-7436 www.llcc.edu/cctc Writing Queries Using Microsoft SQL Server 2008 Transact-SQL Course 2778-08;
PeopleSoft Query Training
PeopleSoft Query Training Overview Guide Tanya Harris & Alfred Karam Publish Date - 3/16/2011 Chapter: Introduction Table of Contents Introduction... 4 Navigation of Queries... 4 Query Manager... 6 Query
3.GETTING STARTED WITH ORACLE8i
Oracle For Beginners Page : 1 3.GETTING STARTED WITH ORACLE8i Creating a table Datatypes Displaying table definition using DESCRIBE Inserting rows into a table Selecting rows from a table Editing SQL buffer
