Oracle Database/Spatiotemporal Databases

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Spatial data[edit | edit source]

When typing the fields, some represent graphical objects, and so are considered as "Spatial" (cf. spatial database). Consequently, they are manipulated with different requests than for the text.

With Oracle, its implemented since the version 7, in an extension of the Enterprise EditionDownload, provided objects with the prefix SDO for Spatial Data Option[1].

Objects[edit | edit source]

To store the spatial objects, we use the field type SDO_GEOMETRY, and the seven methods to manipulate it[2]:

  1. Get_Dims
  2. Get_GType
  3. Get_LRS_Dim
  4. Get_WKB
  5. Get_WKT
  6. ST_CoordDim
  7. ST_IsValid

Then the request operators[3]:

  1. SDO_FILTER: list the objects which interact with the target.
  2. SDO_JOIN: spatial join.
  3. SDO_NN: target nearest neighbor.
  4. SDO_NN_DISTANCE: distance with the nearest neighbor.
  5. SDO_RELATE: list the objects which interact in a certain manner.
  6. SDO_WITHIN_DISTANCE: returns true if two objects are within a certain distance from one to another.

Spatiotemporal data[edit | edit source]

We use a predicate to foresee the stored objects movement[4]. However, the spatiotemporal databases need frequent updates.

Indexation[edit | edit source]

Les modes d'indexation choisis par Oracle pour les données spatiales sont l'arbre R[5], l'arbre Q, et le Z-order[6].

Link with the GIS[edit | edit source]

To represent the data on maps, we use a geographic information system (GIS). For example:

QGIS links configuration with the databases (including Oracle).
QGIS links configuration with the databases (including Oracle).


If the software need an ODBC data source to access to the Oracle databases:

  1. Launch %windir%\system32\odbcad32.exe.
  2. Add a system source. The Oracle driver can be chosen in the list if the DBMS is installed.
  3. Fill the TNS service name with the name which can be found into C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora.
  4. Then write the password of the connection created with SQL*Plus.

Examples[edit | edit source]

References[edit | edit source]

  1. "Spatial Developer's Guide". {{cite web}}: Unknown parameter |site= ignored (help)
  2. "SDO_GEOMETRY Object Type". {{cite web}}: Unknown parameter |site= ignored (help)
  3. "Spatial Operators". {{cite web}}: Unknown parameter |site= ignored (help)
  4. "Authorizing Access to Dynamic Spatial-Temporal Data". {{cite web}}: Unknown parameter |site= ignored (help)
  5. "Spatial Concepts". {{cite web}}: Unknown parameter |site= ignored (help)
  6. "ZOrder Method". {{cite web}}: Unknown parameter |site= ignored (help)
  7. "Geographic Resources Analysis Support System (GRASS): More Than a Mapping Tool". {{cite web}}: Unknown parameter |site= ignored (help)