1
Real Life Applications of Location Analytics Dan Geringer, Senior Software Development Manager, Oracle Jayant Sharma, Director Prod Mgmt, Oracle 2
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle. 3
Program Agenda Introducing Oracle Spatial and Graph Some Use Cases Discussion 4
INTRODUCING 5
Why rename this Oracle Database option From Oracle Spatial to Oracle Spatial and Graph Highlights existing graph capabilities in Oracle Spatial W3C RDF graph since Oracle 10gR2 Network Data Model graph since Oracle 10gR1 Addresses increasing market demand for graph database capabilities Social Network Graph database popularity Multimodal and integrated transportation, utility and communications networks 6
Oracle Spatial and Graph option Points Web Services (OGC) Lines Oracle Spatial and Graph Polygons Geocoding Routing Rasters Network Graphs e1 f1 e2 n1 n2 f2 e4 e3 Topologies 3D RDF Semantic Graphs 7
Oracle Spatial and Graph option Spatial Features Spatial Data Types and Models 2D and 3D Geometries Raster Imagery and Gridded Data Land Management Persistent Topology Geographic and Whole Earth (Geodetic) Network Data Model Graph Spatial Analysis Spatial Search (Containment & Proximity) Geocoding (Address conversion) Routing (Turn by Turn directions) Indexing of 2D & 3D Full Coordinate System Support 8
Oracle Spatial and Graph option Graph Features Network Data Model graph W3C RDF Semantic graph 9
Agenda Introduction Some Use Cases Discussion 10
Display application content and context 11
Reports in operational applications 12
Use in operational workflows Network Pinning and Work Tagging 13
Spatial visualization in interactive reports 14
Map views in BI dashboards 15
Usage Scenarios in (public sector) CRM Public safety Show incidents by type within or near specified location 16
Usage Scenarios in (public sector) CRM Show KPIs by service district 17
Geomarketing examples 18
TMC: Oracle SiteHub & Retail Analytics 19
20
Sales by store 21
Members who shopped at selected store 22
Where do the frequent customers live 23
Reports/analysis using drive-time polygons 24
Or by custom (user-drawn) areas 25
Solution architecture Client (browser) IsoChrone Area Editing IsoChrone OBI-Report Oracle WLS J2EE Container MapViewer NDM WithinCost Analysis Polygon Editing Jsp BI Publisher JDBC Oracle DBMS 11.2 Get the analysis area Bridge GeoBI Package SDO_Geom Package (Intersection, Union, Difference..) GeoDatawarehouse Schema Table 26
TARGUSinfo ElementOne Analytics OVERVIEW Comprehensive cloud based GIS analytics platform Provide rich data and cutting edge analytics to help clients acquire, retain and grow high value customers CHALLENGES / OPPORTUNITIES Ensure enterprise level security needs Provide mechanism for efficient and optimal data transfer Fast query response times for large customer and transaction level datasets Frequent, transparent software and data updates Quick and easy set up SOLUTION Oracle Database 11g Release 2 Enterprise Edition Spatial Option with GeoRaster, Network Data Model Partitioning Advanced Security Oracle Fusion Middleware 11g MapViewer RESULTS Up to10x performance improvement for detailed mapping with the use of MapViewer map cache Use of NDM partitioned blobs resulted in 300% quicker isochrone creation times while increasing accuracy Consolidation of raster, vector, network data in 500 GB sized central repository Utilize topology to maintain accurate geography relationships Improved base data precision with 25M+ ZIP4 level data 27
Use of Spatial LRS & Network Data Model Features used SDO_LRS to build comprehensive road network SDO_NET partitioning and load-on-demand for scalability and performance NDM APIs for custom costs and path analysis 28
Use of Oracle Spatial 11gR2 Features Advanced functions SDO_CS for transformations buffer, union, difference, convexhull etc for polygon generation sdo_validate, simplify, rectify_geom for cleansing sdo_tin for heatmaps 29
Large Scale Drive Time/Distance Analysis For millions of customers, find closest store within a specified drive time Same underlying data for geocoder and road network Customers geocode as link id and percentage (instead of longitude/latitude) 5 mile Network Buffer generates all possible paths Each persisted path includes: Covered link IDs, nodes ID, and associated costs Single database query to find closest store, and drive time, for each customer (join on link_id) Store Location Customer Location 30
Benefits with Parallel Query, Exadata Database Machine 31
Parallel Query and Spatial Rail Application 32
Parallel Query And Spatial Operators Rail Application Requirement GPS locations for each train collected throughout the day Each location has other attributes (time, speed, and more) GPS locations have a degree of error, so they don t always fall on a track. Bulk nearest neighbor queries to find closest track, and project reported train positions onto tracks This information is used for: Tracking trains Analysis for maintenance, ensure engineers are within parameters,etc 33
Parallel Query And Spatial Operators What we tested 45,158,800 GPS train positions. For each train position: Find the closest track to the train (with SDO_NN) Then calculate the position on the track closest to the train 34
Parallel Query And Spatial Operators Rail Application ALTER SESSION FORCE PARALLEL ddl PARALLEL 72; ALTER SESSION FORCE PARALLEL query PARALLEL 72; CREATE TABLE results NOLOGGING SELECT /*+ ordered index (b tracks_spatial_idx) */ a.locomotive_id, sdo_lrs.find_measure (b.track_geom, a.locomotive_pos) FROM locomotives a, tracks b WHERE sdo_nn (b.track_geom, a.locomotive_pos, 'sdo_num_res=1') ='TRUE'; 35
Parallel Query And Spatial Operators Exadata Results On Exadata Half RAC: 34.75 hours serially vs. 44.1 minutes in parallel 48 database cores - 47x faster On Exadata X2-2 Full Rack 96 database cores about 94x faster X2-8 (128 cores) even faster 36
Parallel Query and Spatial Validation Of Home Appraisals 37
Validation Of Home Appraisals Exadata Results Validate home appraisals for a Government Sponsored Enterprise (GSE) Requirement - Find all the parcels touching parcels to validate appraisals Processed 2,018,429 parcels Exadata ½ RAC: Serially 38.25 minutes Parallel - 48 cores (45x faster) - 50 seconds Exadata X2-2 Full RAC (96 cores) about 90x faster Exadata X2-8 (128 cores) even faster 38
Parallel Query and Spatial Parallel Enabled Pipeline Table Functions 39
Parallel Enabled Pipeline Table Function Parallelize a function that s called a massive amount of times. Batch geocoding (sdo_gcdr.geocode_address) Batch reverse geocoding (sdo_gcdr.reverse_geocode) Batch Digital Elevation Model (DEM) raster lookups (sdo_geor.get_cell_value) Pipeline Table Function returns a table of results Table of geocodes Table of reverse geocodes Table of elevation values 40
Parallel Enabled Pipeline Table Function How does it work? Define cursor that selects the input to the batch process: SELECT customer_addresses FROM address_table WHERE state = NY ; SELECT vehicle_location FROM vehicles WHERE sdo_anyinteract (location,:region) = TRUE Parallel Query distributes the batch process over a specified number of database cores. 41
Parallel Enabled Pipeline Table Function Exadata ¼ RAC has 2 nodes, each with 12 cores (24 cores total) ALTER SESSION FORCE PARALLEL DML PARALLEL 24; ALTER SESSION FORCE PARALLEL QUERY PARALLEL 24; -- To balance parallel slaves across nodes. ALTER SESSION SET "_parallel_load_balancing"=false; CREATE TABLE results (id NUMBER, geom SDO_GEOMETRY); INSERT /*+ append */ INTO results SELECT id, sdo_geometry (2001,8307,sdo_point_type(longitude,latitude,null),null,null) geom FROM table( geocode_pipelined ( CURSOR(SELECT id, streetname, city, state, zip, housenum FROM ascii_addrs) )); COMMIT; 42
Parallel Enabled Pipeline Table Function To Maximize Exadata ¼ RAC (24 cores) ALTER SESSION FORCE PARALLEL DML PARALLEL 48; ALTER SESSION FORCE PARALLEL QUERY PARALLEL 48; CREATE TABLE results (id NUMBER, geom SDO_GEOMETRY); INSERT /*+ append */ INTO results SELECT id, sdo_geometry (2001,8307,sdo_point_type(longitude,latitude,null),null,null) geom FROM table( geocode_pipelined ( CURSOR(SELECT id, streetname, city, state, zip, housenum FROM ascii_addrs) )); COMMIT; 43
Parallel Pipelined Table Function Exadata Results Exadata ¼ RAC Has 24 Cores Batch geocoding 1365/second Batch reverse geocoding 3388/second Batch DEM get_cell_value raster lookups 8951/second 44
Q&A 45