source: TI01-discovery/branches/ingestAutomation-upgrade/database/transformed_document.sql @ 3849

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/transformed_document.sql@3849
Revision 3849, 1.5 KB checked in by cbyrom, 13 years ago (diff)

Adjust tables to use timestamps instead of dates - and add create dates to
the spatiotemporal tables + add delete cascade to the spatial_temporal_data
to allow easy removal of spatial and temporal records.

  • Property svn:executable set to *
Line 
1/*
2 * Basic DB structure to use in test of NERC Discovery upgrad
3 *
4 * C Byrom Apr 08
5 *
6 */
7--CREATE SCHEMA badc;
8--CREATE TABLE badc.records (
9DROP TABLE transformed_document;
10CREATE TABLE transformed_document (
11        transformed_document_id         SERIAL primary key,
12                original_record_id      int references original_document(original_document_id),
13                transformed_format      text,
14                transformed_document    text,
15                create_date     timestamp,
16                update_date timestamp,
17                scn                     int
18);
19
20INSERT INTO transformed_document VALUES (DEFAULT, 1,  'moles', null, current_date, null, 1);
21INSERT INTO transformed_document VALUES (DEFAULT, 1,  'mdip', 
22'<mdip xmlns="http://earth.google.com/kml/2.2">
23  <Folder>
24        <name>Aggregation of KML documents by NDG Portal</name>
25    <visibility>0</visibility>
26        <open>0</open>
27        <description>The NetworkLink KML resources are those selected by the user when creating the document in the NDG portal (include URL?)</description>
28                    <NetworkLink>
29                        <name>ARGO Active float data; latitude range 45S to 90S; 18 March</name>
30                        <visibility>0</visibility>
31                        <open>0</open>
32                        <description>ARGO Active float data; latitude range 45S to 90S; 18 March - aggregated by the NDG Portal</description>
33                        <refreshVisibility>0</refreshVisibility>
34                        <flyToView>0</flyToView>
35                        <Link>
36                                <href>
37                                        http://psdocean.nerc-bas.ac.uk/ARGO/web/Active45S-90S.kmz
38                                </href>
39                        </Link>
40                </NetworkLink>
41  </Folder>
42</mdip>',
43current_date, null, 1);
44
Note: See TracBrowser for help on using the repository browser.