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

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

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:    ASN_PRODUCT_LINK.SDDL-->
<!-- -->
<!--  Purpose:      This SDDL file defines the ASN_PRODUCT_LINK relation.-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       OPR      Who                       Reason-->
<!--  - - - -    - - - -    - -   - - - - - - - - - - - - - - - - - - - -  -->
<!--  05/14/99   39260      Baum  Original implementation-->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->


    <record name="ASN_LNK_TYPE">

        <description>This relation is used for all products for an OPUS
                   association. It identifies the exposures contained in
                   each product. It can also be accessed to find the products
                   association with any exposure. The other relations used to
                   describe OPUS associationa are ASN_ASSOCIATION and 
                   ASN_MEMBERS  </description>



            <field name="program_id">
                    <type>C3</type>

                    <description>When a proposal is accepted into the PMDB by SPSS it must
                    be assigned a unique 3 character base 36 program identifier.
                    This is done by the PMDB/ACCEPT_PROP command.  This program
                    identifier is tagged as 'program_id' in most PMDB relations.
                    Is is used for identification of proposals by spacecraft
                    and OPUS software. It is also used in the OPUS and DADS
                    rootname for all archived science data files.
                    Because of flight design software, program_id must be
                    three characters.</description>
            </field>


            <field name="asn_obset_id">
                    <type>C2</type>

                    <description>Association observation set identifier. 

                    An observation set is identified by a 2 character base 36
                    string.  This field,  typically called 'obset_id', will
                    often contribute to the index on relation together with a
                    proposal_id, version_num, and possibly other fields.

                    OBSET is an abbreviation for observation set.</description>
            </field>

            <field name="member_num">
                    <type>C3</type>
                    <units>BASE_36</units>
                    <description>Member number (in asn_members) of the product: it is the
                     association number (two characters) plus the product_id.</description>
            </field>

 
            <field name="obset_id">
                    <type>C2</type>

                    <description>Exposure observation set identifier. 

                    An observation set is identified by a 2 character base 36
                    string.  This field,  typically called 'obset_id', will
                    often contribute to the index on relation together with a
                    proposal_id, version_num, and possibly other fields.

                    OBSET is an abbreviation for observation set.</description>
            </field>

            <field name="ob_number">
                    <type>C2</type>
                    <units>BASE_36</units>
                    <description>Observations are numbered sequentially throughout
                     an observation set and are assigned by SMS/Gen.
                     An ob_number is _NOT_ the same as an obset_ID.
                     This field can be joined to member_num for 
                     exposure records in asn_members.</description>
            </field>
    </record>




    <relation name="asn_product_link">

        <type>ASN_LNK_TYPE</type>

        <description>Association Members Relation</description>

        <subsystem_using>OPUS</subsystem_using>
        <subsystem_using>DADS</subsystem_using>

        <index name="asn_product_link_1">
            <type>unique clustered</type>
            <field name="program_id"/>
            <field name="asn_obset_id"/>
            <field name="member_num"/>
            <field name="obset_id"/>
            <field name="ob_number"/>
        </index>

        <index name="asn_product_link_2">
            <type>nonclustered</type>
            <field name="program_id"/>
            <field name="obset_id"/>
            <field name="ob_number"/>
        </index>

    </relation>
</sddl>
