From what we have learned so far, a table/column implementation matrix can be produced that will allow us to implement all possible variations of the SQL/MM Spatial standard. In the following diagram, the matrix is implemented only for the
ST_POINT subtype. However, included with this book are a set of SQL files that provide an implementation of the standard's
ST_* geometry types. No Primary Key attribute and constraint text is included for brevity's sake in any of the implementations shown in the following diagram:
Because some Oracle geometry subtypes (CircularString) can only be identified by functions that cannot be used by
CHECK constraints (such as
Get_WKT), a trigger must be constructed to implement the constraint:
Create Or Replace Trigger st_road_circularstring_biu Before Insert or update on ST_ROAD Referencing old As old new As new For Each Row Begin If (:new.GEOM IS NULL) Then Return; End If; If (:new.GEOM IS NOT NULL And ...