[GRASS-SVN] r51464 - grass/trunk/lib/temporal/SQL

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 17 16:50:46 EDT 2012


Author: huhabla
Date: 2012-04-17 13:50:45 -0700 (Tue, 17 Apr 2012)
New Revision: 51464

Modified:
   grass/trunk/lib/temporal/SQL/map_tables_template.sql
   grass/trunk/lib/temporal/SQL/vector_metadata_table.sql
Log:
Index creation for start and end time columns. Using boolean type in vector metadata.


Modified: grass/trunk/lib/temporal/SQL/map_tables_template.sql
===================================================================
--- grass/trunk/lib/temporal/SQL/map_tables_template.sql	2012-04-17 20:15:12 UTC (rev 51463)
+++ grass/trunk/lib/temporal/SQL/map_tables_template.sql	2012-04-17 20:50:45 UTC (rev 51464)
@@ -38,6 +38,8 @@
   FOREIGN KEY (id) REFERENCES  GRASS_MAP_base (id) ON DELETE CASCADE
 );
 
+CREATE INDEX GRASS_MAP_relative_time_index ON GRASS_MAP_relative_time (start_time, end_time);
+
 CREATE TABLE  GRASS_MAP_absolute_time (
   id VARCHAR NOT NULL,   -- The id (PFK) is the unique identifier for all tables, it is based on name and mapset (name at mapset) and is used as primary foreign key
   start_time TIMESTAMP,  --  Start of the valid time, can be NULL if no time information is available
@@ -47,6 +49,8 @@
   FOREIGN KEY (id) REFERENCES  GRASS_MAP_base (id) ON DELETE CASCADE
 );
 
+CREATE INDEX GRASS_MAP_absolute_time_index ON GRASS_MAP_absolute_time (start_time, end_time);
+
 -- The spatial extent of a raster map
 
 CREATE TABLE  GRASS_MAP_spatial_extent (

Modified: grass/trunk/lib/temporal/SQL/vector_metadata_table.sql
===================================================================
--- grass/trunk/lib/temporal/SQL/vector_metadata_table.sql	2012-04-17 20:15:12 UTC (rev 51463)
+++ grass/trunk/lib/temporal/SQL/vector_metadata_table.sql	2012-04-17 20:50:45 UTC (rev 51464)
@@ -12,7 +12,7 @@
 CREATE TABLE  vector_metadata (
   id VARCHAR NOT NULL,    -- The id (PFK) is the unique identifier for all tables, it is based on name and mapset (name at mapset) and is used as primary foreign key
   stvds_register VARCHAR, -- The name of the table storing all space-time vector datasets in which this map is registered
-  is_3d INTEGER,          -- This is 1 if the vector map is 3d and 0 otherwise 
+  is_3d BOOLEAN,          -- This is 1 if the vector map is 3d and 0 otherwise 
   points INTEGER,         -- The number of points
   lines INTEGER,          -- The number of lines
   boundaries INTEGER,     -- The number of boundaries



More information about the grass-commit mailing list