<?xml version="1.0" encoding="UTF-8"?>

<!-- <!DOCTYPE sddlschema SYSTEM "sddlschema.xsd">-->

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:    CGG5_DEEPREL.SDDL-->
<!-- -->
<!--  Purpose:      This SDDL file defines the CGG5_DEEPREL relation.-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       PR      Who                       Reason -->
<!--  - - - -    - - - -   - -   - - - - - - - - - - - - - - - - - - - - - -->
<!--  06/26/96   28179     Rose  Original implementation -->
<!--  01/25/02   42854     Sontag  Added field 'fieldtype' to cgg5_deeprel. -->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->


    <record name="DEEPREL_TYPE">

        <description>This relation is used in OPUS to define which fields are
		used as the keyword and value fields for each deep relation.

		A shallow relation has a single tuple for a particular
		exposure, and usually contains a large number of fields.
		Every time the requirements change for such a relation,
		a new instrument is defined, or a new keyword is needed,
		the relation itself has to change.  Take for example the
		relation qelogsheet.

		A deep relation has, in addition to the key fields which
		are used to join with other relations, only two fields:
		one which specifies the name of the variable, and a second
		which specifies the value of that variable for the particular
		observation.  An example of such a deep relation is qesiparm.</description>



        <field name="relation">
            <type>C31</type>
            <description>The name of the relation in the database. 
		     eg: qesiparm</description>
        </field>

        <field name="namefield">
            <type>C31</type>
	    <description>The name of the field in that relation which
		     contains the variable name.  eg: si_par_name</description>
        </field>

        <field name="valfield">
            <type>C31</type>
	    <description>The name of the field in that relation which
		     contains the value of the variable. eg: si_par_value</description>
        </field>

        <field name="fieldtype">
            <type>C31</type>
	    <description>The type of the field in that relation specified
		     by the value of the field valfield. </description>
            <discrete>int</discrete>
            <discrete>float</discrete>
            <discrete>double</discrete>
            <discrete>string</discrete>
        </field>

    </record>


    <relation name="cgg5_deeprel">

        <type>DEEPREL_TYPE</type>

        <description>Deep relation fields</description>

        <subsystem_using>OPUS</subsystem_using>

        <index name="cgg5_deeprel_1">
                <type>unique clustered</type>
                <field name="relation"/>
        </index>

    </relation>



    <instance  name="cgg5_deeprel" scope="global" type="DEEPREL_TYPE" />


</sddl>
