<!DOCTYPE ripe_attributes SYSTEM "attributes.dtd">

<ripe_attributes version="$Version$" author="$Author: marek $">

  <ripe_attribute name="admin-c" code="ac">
    <description>
      An on-site contact (person)
    </description>
    <format>
      &lt;NIC-handle&gt;
    </format>

    <representation> 
    <sqltable name="admin_c">
      <insert qtype="ud_aux__">
        INSERT admin_c 
        SELECT %d, %ld, person_role.object_id, %d 
        FROM person_role 
        WHERE person_role.nic_hdl='%s'
      </insert>
      <update qtype="ud_ax_pr">
        UPDATE admin_c
        SET thread_id=%d
        WHERE object_id=%ld
        AND pe_ro_id=%ld
      </update>
      <dummy qtype="ud_ax_pr">
        INSERT person_role 
        SET thread_id=%d, object_id=%ld, nic_hdl='%s', object_type=%d, dummy=1
      </dummy>
    </sqltable>
    </representation>
    <keys searchable="inverse">
      <foreign value="nh"/>
      
      <queries>
        <sqlquery keytype="wk_name" class="ANY">
          SELECT i.object_id
          FROM   admin_c i, %s
          WHERE  %s
          AND    i.pe_ro_id = N00.object_id
	  AND	 i.thread_id = 0
        </sqlquery>
        <sqlquery keytype="wk_nic_hdl" class="ANY">
          SELECT i.object_id
          FROM   admin_c i, person_role
          WHERE  i.pe_ro_id = person_role.object_id
          AND    person_role.nic_hdl  = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="as-name" code="aa">
    <description>
      A descriptive name associated with an AS.
    </description>
    <format>
      Uppercase letters, dashes ("-") and digits, no spaces.
      Must start with a letter.
    </format>
  </ripe_attribute>

  <ripe_attribute name="address" code="ad">
    <description>
      Full postal address of a person.
    </description>
    <format>
      Free Text.
    </format>
  </ripe_attribute>

  <ripe_attribute name="aggr-mtd" code="ag">
    <description>
      aggr-mtd
    </description>
    <format>
      INSERT aggr-mtd desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="aggr-bndry" code="ab">
    <description>
      aggr-bndry
    </description>
    <format>
      INSERT aggr-bndry desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="as-block" code="ak">
    <description>
      as-block
    </description>
    <format>
      INSERT as-block desc here.
    </format>


    <representation> 
    <sqltable name="as_block">
      <insert qtype="ud_ma_ak">
        INSERT as_block 
        SET thread_id=%d, object_id=%ld, begin_as=%d, end_as=%d
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_ma_ak">
        begin_as=%d AND end_as=%d AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>
      <queries>
	<sqlquery keytype="wk_asrange">
	  SELECT object_id
	  FROM  as_block
	  WHERE begin_as &lt;= %u
	  AND   end_as   &gt;= %u
	  AND	thread_id = 0
	</sqlquery>  
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="as-exclude" code="ae">
    <description>
      as-exclude
    </description>
    <format>
      INSERT as-exclude desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="auth-override" code="ay">
    <description>
       An auth-override attribute can be added, deleted, or
       changed by a transaction submitted by maintainer listed in the
       referral-by.  An auth-override can only be added to a maintainer
       if that maintainer has been inactive for the prior 60 days.  The
       auth-override attribute itself contains only the date when the at-
       tribute will go into effect which must be at least 60 days from the
       current date unless there is already authorization to modify the
       maintainer.  After the date in the auth-override is reached, those
       identified by the maintainer in the referral-by have authoriza-
       tion to modify the maintainer.  This attribute exists as a means to
       clean up should the holder of a maintainer become unresponsive and
       can only take effect if that maintainer does not remove the auth-
       override in response to the automatic notification that occurs on
       changes.
    </description>
    <format>
      INSERT auth-override format here.
    </format>

    <representation>
      <sqltable name="auth_override">
        <insert qtype="ud_lf_ay">
          INSERT auth_override 
          SET thread_id=%d, object_id=%ld, date=%ld
        </insert>
        <update qtype="ud_lf_ay">
          UPDATE auth_override 
          SET thread_id=%d 
          WHERE object_id=%ld 
          AND date=%ld
        </update>
      </sqltable>
    </representation>	

    <keys searchable="lookup">
    </keys>  
  </ripe_attribute>

  <ripe_attribute name="author" code="ah">
    <description>
      Limerick author.
    </description>
    <format>
      &lt;NIC-handle&gt;
    </format>
    <representation> 
    <sqltable name="author">
      <insert qtype="ud_aux__">
        INSERT author 
        SELECT %d, %ld, person_role.object_id, %d 
        FROM person_role 
        WHERE person_role.nic_hdl='%s'
      </insert>
      <update qtype="ud_ax_pr">
        UPDATE author
        SET thread_id=%d
        WHERE object_id=%ld
        AND pe_ro_id=%ld
      </update>
      <dummy qtype="ud_ax_pr">
        INSERT person_role 
        SET thread_id=%d, object_id=%ld, nic_hdl='%s', object_type=%d, dummy=1
      </dummy>
    </sqltable>
    </representation>
    <keys searchable="inverse">
      <foreign value="nh"/>
      <queries>
        <sqlquery keytype="wk_name" class="ANY">
          SELECT i.object_id
          FROM   author i, %s
          WHERE  %s
          AND    i.pe_ro_id = N00.object_id
	  AND	 i.thread_id = 0
        </sqlquery>
        <sqlquery keytype="wk_nic_hdl" class="ANY">
          SELECT i.object_id
          FROM   person_role, author i
          WHERE  person_role.object_id = i.pe_ro_id
          AND    person_role.nic_hdl  = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="as-in" code="ai">
    <description>
      as-in
    </description>
    <format>
      INSERT as-in desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="as-list" code="al" status="deprecated">
    <description>
      as-list
    </description>
    <format>
      INSERT as-list desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="as-macro" code="am" status="deprecated">
    <description>
      as-macro
    </description>
    <format>
      INSERT as-macro desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="aut-num" code="an">
    <description>
      The autonomous system number.  This must be a uniquely
      allocated autonomous system number from an AS registry
      (e.g.RIPE NCC, the Inter-NIC, etc).
    </description>
    <format>
      "AS"&lt;positive integer between 1 and 65535&gt;
    </format>

    <representation> 
    <sqltable name="aut_num">
      <insert qtype="ud_main_">
        INSERT aut_num 
        SET thread_id=%d, object_id=%ld, aut_num='%s'
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_main_">
        aut_num='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>
      
      <queries>
        <sqlquery keytype="wk_autnum">
          SELECT object_id
          FROM   aut_num
          WHERE  aut_num = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="as-out" code="ao">
    <description>
      as-out
    </description>
    <format>
      INSERT as-out desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="as-set" code="as">
    <description>
      as-set
    </description>
    <format>
      INSERT as-set desc here.
    </format>

    <representation> 
    <sqltable name="as_set">
      <insert qtype="ud_main_">
        INSERT as_set 
        SET thread_id=%d, object_id=%ld, as_set='%s', dummy=0
      </insert>
      <update qtype="ud_main_">
        UPDATE as_set
        SET thread_id=%d
        WHERE object_id=%ld
      </update>
      <select qtype="ud_main_">
        as_set='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>
      
      <queries>
        <sqlquery keytype="wk_assetname">
          SELECT object_id
          FROM   as_set
          WHERE  as_set = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="auth" code="at">
    <description>
      auth
    </description>
    <format>
      INSERT auth desc here.
    </format>

    <representation> 
    <sqltable name="auth">
      <insert qtype="ud_lf_at">
        INSERT auth 
        SET thread_id=%d, object_id=%ld, object_type=%d, auth='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE auth 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND auth='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="lookup">  
    </keys>
  </ripe_attribute>

  <ripe_attribute name="authority" code="au">
    <description>
      authority
    </description>
    <format>
      INSERT authority desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="advisory" code="av">
    <description>
      advisory
    </description>
    <format>
      INSERT advisory desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="alias" code="az">
    <description>
      alias
    </description>
    <format>
      INSERT alias desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="bis" code="bi">
    <description>
      bis
    </description>
    <format>
      INSERT bis desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="certif" code="ce">
    <description>
      certif
    </description>
    <format>
      INSERT certif desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="changed" code="ch">
    <description>
      Who previously changed this object
      and when this change was made.
    </description>
    <format>
      &lt;RFC822 e-mail address&gt; &lt;DATE&gt;
      E-mail address of person updating the object.
      DATE in YYYYMMDD or YYMMDD format.
    </format>
  </ripe_attribute>

  <ripe_attribute name="comm-list" code="cl">
    <description>
      comm-list
    </description>
    <format>
      INSERT comm-list desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="community" code="cm">
    <description>
      community
    </description>
    <format>
      INSERT community desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="cross-nfy" code="cn">
    <description>
      cross-nfy
    </description>
    <format>
      INSERT cross-nfy desc here.
    </format>

    <representation> 
    <sqltable name="cross_nfy">
      <insert qtype="ud_aux__">
        INSERT cross_nfy 
        SELECT %d, %ld, person_role.object_id, %d 
        FROM person_role 
        WHERE person_role.nic_hdl='%s'
      </insert>
      <update qtype="ud_ax_pr">
        UPDATE cross_nfy
        SET thread_id=%d
        WHERE object_id=%ld
        AND pe_ro_id=%ld
      </update>
      <dummy qtype="ud_ax_pr">
        INSERT person_role 
        SET thread_id=%d, object_id=%ld, nic_hdl='%s', object_type=%d, dummy=1
      </dummy>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <foreign value="nh"/>
      
      <queries>
        <sqlquery keytype="wk_nic_hdl" class="ANY">
          SELECT i.object_id
          FROM   person_role, cross_nfy i
          WHERE  person_role.object_id = i.pe_ro_id
          AND    person_role.nic_hdl  = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="components" code="co">
    <description>
      components
    </description>
    <format>
      INSERT components desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="cross-mnt" code="ct">
    <description>
      cross-mnt
    </description>
    <format>
      INSERT cross-mnt desc here.
    </format>
 
    <representation> 
    <sqltable name="cross_mnt">
      <insert qtype="ud_aux__">
        INSERT cross_mnt 
        SELECT %d, %ld, mntner.object_id, %d 
        FROM mntner 
        WHERE mntner.mntner='%s'
      </insert>
      <update qtype="ud_ax_mt">
        UPDATE cross_mnt
        SET thread_id=%d
        WHERE object_id=%ld
        AND mnt_id=%ld
      </update>
      <dummy qtype="ud_ax_mt">
        INSERT mntner 
        SET thread_id=%d, object_id=%ld, mntner='%s', dummy=1
      </dummy>
    </sqltable>
    </representation>

     <keys searchable="inverse">
      <foreign value="mt"/>
      <queries>
        <sqlquery keytype="wk_mntner" class="ANY">
          SELECT i.object_id
          FROM   mntner, cross_mnt i
          WHERE  mntner.object_id = i.mnt_id
          AND    mntner.mntner = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="country" code="cy">
    <description>
      ATB country DESC Name of the country of the admin-c.
    </description>
    <format>
      ATB country FRMT 2 letter uppercase ISO 3166 country code.
    </format>
  </ripe_attribute>

  <ripe_attribute name="dom-name" code="da" status="deprecated">
    <description>
      dom-name
    </description>
    <format>
      INSERT dom-name desc here.
    </format>
    <keys searchable="lookup">
    </keys>
  </ripe_attribute>

  <ripe_attribute name="descr" code="de">
    <description>
      A short decription of this object.
    </description>
    <format>
      All characters possible.
    </format>
  </ripe_attribute>

  <ripe_attribute name="default" code="df">
    <description>
      default
    </description>
    <format>
      INSERT default desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="dictionary" code="dc">
    <description>
      dictionary
    </description>
    <format>
      INSERT dictionary desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="dom-net" code="di">
    <description>
      List of IP networks in a domain.
    </description>
    <format>
      Dotted quad including trailing 0's.
    </format>
  </ripe_attribute>

  <ripe_attribute name="dom-in" code="dm">
    <description>
      dom-in
    </description>
    <format>
      INSERT dom-in desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="domain" code="dn">
    <description>
      IP domain name.
    </description>
    <format>
      Full qualified domain name without trailing ".".
    </format>

    <representation>
	<sqltable name="domain">	
	      <insert qtype="ud_main_">
	        INSERT domain 
	        SET thread_id=%d, object_id=%ld, domain='%s'
	      </insert>
	      <update qtype="ud_main_"></update>
	      <select qtype="ud_main_">
	        domain='%s' AND
	      </select>
	</sqltable>	
	<radixtrees family="RX_FAM_RT">
	     <IP_V4>
		SELECT domain.object_id,prefix,prefix_length,domain 
		FROM inaddr_arpa,domain 
		WHERE domain.object_id = inaddr_arpa.object_id
	     </IP_V4>
<!--	     <IP_V6> 
		SELECT....
 	     </IP_V6>	
-->
	</radixtrees>
    </representation>

    <keys searchable="lookup">
      <primary/>

      <queries>
        <sqlquery keytype="wk_domain">
          SELECT object_id
          FROM   domain
          WHERE  domain = '%s'
	  AND	 thread_id = 0
        </sqlquery>
	<radixquery keytype="wk_iprange"   space="IP_V4" />
	<radixquery keytype="wk_ipprefix"  space="IP_V4" />
	<radixquery keytype="wk_ipaddress" space="IP_V4" />
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="dom-out" code="do">
    <description>
      dom-out
    </description>
    <format>
      INSERT dom-out desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="dom-prefix" code="dp" status="deprecated">
    <description>
      dom-prefix
    </description>
    <format>
      INSERT dom-prefix desc here.
    </format>
    <keys searchable="lookup">
      <primary/>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="upd-to" code="dt">
    <description>
      The e-mail address to be notified when an object
      ATB upd-to DESC protected by a mntner is unsuccessfully updated.
    </description>
    <format>
      ATB upd-to FRMT RFC-822 address
    </format>
 
    <representation> 
    <sqltable name="upd_to">
      <insert qtype="ud_leaf_">
        INSERT upd_to 
        SET thread_id=%d, object_id=%ld, upd_to='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE upd_to 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND upd_to='%s'
      </update>
    </sqltable>
    </representation>

   <keys searchable="lookup">
    </keys>

  </ripe_attribute>

  <ripe_attribute name="export-comps" code="ec">
    <description>
      export-comps
    </description>
    <format>
      INSERT export-comps desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="encapsulation" code="en">
    <description>
      encapsulation
    </description>
    <format>
      INSERT encapsulation desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="e-mail" code="em">
    <description>
      The e-mail address of a person or role.
    </description>
    <format>
      RFC-822 address.
    </format>
    <representation> 
    <sqltable name="e_mail">
     <insert qtype="ud_lf_ot">
        INSERT e_mail 
        SET thread_id=%d, object_id=%ld, object_type=%d, e_mail='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE e_mail 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND e_mail='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <queries>
        <sqlquery keytype="wk_email" class="ANY">
          SELECT object_id
          FROM   e_mail i
          WHERE  i.e_mail = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="export" code="ex">
    <description>
      export
    </description>
    <format>
      INSERT export desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="filter" code="fi">
    <description>
      filter
    </description>
    <format>
      INSERT filter desc here.
    </format>

    <representation> 
    <sqltable name="filter_set">
      <insert qtype="ud_ma_u2">
        UPDATE %s SET thread_id=%d, filter='%s' 
        WHERE object_id=%ld
      </insert>
      <update qtype="ud_ma_u2">
        UPDATE %s SET thread_id=%d, filter='%s' 
        WHERE object_id=%ld
      </update>
    </sqltable>
    </representation>

    <keys searchable="lookup">
    </keys>

  </ripe_attribute>

  <ripe_attribute name="fingerpr" code="fp">
    <description>
      fingerpr
    </description>
    <format>
      INSERT fingerpr desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="filter-set" code="fs">
    <description>
      filter-set
    </description>
    <format>
      INSERT filter-set desc here.
    </format>

    <representation> 
    <sqltable name="filter_set">
	<insert qtype="ud_main_">
        INSERT filter_set 
        SET thread_id=%d, object_id=%ld, filter_set='%s', filter='-'
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_main_">
        filter_set='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>
      <queries>
        <sqlquery keytype="wk_filterset">
	SELECT object_id
	FROM   filter_set 
	WHERE  filter_set='%s'
	AND    thread_id=0
	</sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="fax-no" code="fx">
    <description>
      The fax number of a person or role
    </description>
    <format>
      + &lt;Country Code&gt; &lt;Area Code&gt; &lt;Fax Number&gt;
    </format>
  </ripe_attribute>

  <ripe_attribute name="guardian" code="gd" status="deprecated">
    <description>
      guardian
    </description>
    <format>
      INSERT guardian desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="hole" code="ho">
    <description>
      hole
    </description>
    <format>
       INSERT holes desc here.
     </format>
   </ripe_attribute>

  <ripe_attribute name="ifaddr" code="if">
    <description>
      An interface address within an internet router.
    </description>
    <format>
      &lt;Interface Address&gt; &lt;Interface Subnet Mask&gt;
    </format>

    <representation> 
    <sqltable name="ifaddr">
      <insert qtype="ud_lf_if">
        INSERT ifaddr 
        SET thread_id=%d, object_id=%ld, ifaddr=%u
      </insert>
      <update qtype="ud_lf_if">
        UPDATE ifaddr 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND ifaddr=%u 
      </update>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <queries>
        <sqlquery keytype="wk_ipaddress" class="ir">
          SELECT object_id
          FROM   ifaddr
          WHERE  ifaddr &gt;= %u 
	  AND    ifaddr &lt;= %u
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>

  </ripe_attribute>

  <ripe_attribute name="inject" code="ij">
    <description>
      inject
    </description>
    <format>
      INSERT inject desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="inetnum" code="in">
    <description>
      A range of IP address space.
    </description>
    <format>
      x.x.x.x - x.x.x.x, where 0 =&lt; x =&lt; 255
    </format>

    <representation> 
    <sqltable name="">
      <insert qtype="ud_ma_in">
        INSERT inetnum 
        SET thread_id=%d, object_id=%ld, begin_in=%u, end_in=%u
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_ma_in">
        begin_in=%u AND end_in=%u AND
      </select>
    </sqltable>
       <radixtrees family="RX_FAM_IN">
	     <IP_V4>
		SELECT  object_id,begin_in,end_in
		FROM inetnum
	     </IP_V4>
	</radixtrees>
    </representation>

    <keys searchable="lookup">
      <primary/>
      <queries>
        <radixquery keytype="wk_iprange"   space="IP_V4" />
	<radixquery keytype="wk_ipprefix"  space="IP_V4" />
	<radixquery keytype="wk_ipaddress" space="IP_V4" />
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="inet6num" code="i6">
    <description>
      Full IP version 6 address.
    </description>
    <format>
      &lt;ip6num&gt;/&lt;prefix length&gt;
    </format>

    <representation> 
     <sqltable name="inet6num">
      <insert qtype="ud_ma_i6">
        INSERT inet6num 
        SET thread_id=%d, object_id=%ld, 
                i6_msb='%llu', i6_lsb='%llu', 
                prefix_length=%u
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_ma_i6">
	 i6_msb='%llu' AND i6_lsb='%llu' AND prefix_length=%u AND 
      </select>
     </sqltable>	
     <radixtrees family="RX_FAM_RT">
	<IP_V6> 
		SELECT object_id,i6_msb,i6_lsb,prefix_length 
		FROM inet6num
 	</IP_V6>	
	</radixtrees>
    </representation>

    <keys searchable="lookup">
      <primary/>
      <queries>
        <radixquery keytype="wk_ip6prefix" space="IP_V6"/>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="interas-out" code="io">
    <description>
      interas-out
    </description>
    <format>
      INSERT interas-out desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="import" code="ip">
    <description>
      import
    </description>
    <format>
      INSERT import desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="inet-rtr" code="ir">
    <description>
      Fully qualified domain name of an internet router.
    </description>
    <format>
      Fully qualified domain name without trailing "."
    </format>

    <representation> 
    <sqltable name="inet_rtr">
      <insert qtype="ud_main_">
        INSERT inet_rtr 
        SET thread_id=%d, object_id=%ld, inet_rtr='%s'
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_main_">
        inet_rtr='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>

      <queries>
        <sqlquery keytype="wk_domain">
          SELECT object_id
          FROM   inet_rtr
          WHERE  inet_rtr = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="rtr-set" code="is">
    <description>
      rtr-set
    </description>
    <format>
      INSERT rtr-set desc here.
    </format>

    <representation> 
    <sqltable name="">
      <insert qtype="ud_main_">
        INSERT rtr_set 
        SET thread_id=%d, object_id=%ld, rtr_set='%s', dummy=0
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_main_">
        rtr_set='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>
      <queries>
	<sqlquery keytype="wk_rtrset">
	SELECT object_id
	FROM   rtr_set 
	WHERE  rtr_set='%s'
	AND    thread_id=0
	</sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="interas-in" code="it">
    <description>
      interas-in
    </description>
    <format>
      INSERT interas-in desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="key-cert" code="kc">
    <description>
      key-cert
    </description>
    <format>
      INSERT key-cert desc here.
    </format>

    <representation> 
    <sqltable name="key_cert">
      <insert qtype="ud_main_">
        INSERT key_cert 
        SET thread_id=%d, object_id=%ld, key_cert='%s'
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_main_">
        key_cert='%s' AND
      </select>
    </sqltable>
    </representation>	

    <keys searchable="lookup">
      <primary/>

      <queries>
        <sqlquery keytype="wk_key_cert">
          SELECT object_id
          FROM   key_cert
          WHERE  key_cert = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="local-as" altName="localas" code="la">
    <description>
      The autonomous system in which a router belongs.
    </description>
    <format>
      AS&lt;positive integer between 1 and 65535&gt;.
    </format>

    <representation> 
    <sqltable name="">
      <insert qtype="ud_ma_u2">
        UPDATE %s SET thread_id=%d, local_as='%s' 
	WHERE object_id=%ld 
      </insert>
      <update qtype="ud_ma_u2">
        UPDATE %s SET thread_id=%d, local_as='%s' 
	WHERE object_id=%ld 
      </update>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <queries>
        <sqlquery keytype="wk_autnum" class="ir">
          SELECT object_id
          FROM   inet_rtr
          WHERE  local_as  = '%s'
 	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="limerick" code="li">
    <description>
      Title of a limerick.
    </description>
    <format>
      LIM-&lt;string&gt;, where string can include
      alphanumeric characters, "-" character.
    </format>

    <representation> 
    <sqltable name="limerick">
      <insert qtype="ud_main_">
        INSERT limerick 
        SET thread_id=%d, object_id=%ld, limerick='%s'
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_main_">
        limerick='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>

      <queries>
        <sqlquery keytype="wk_limerick" >
          SELECT object_id
          FROM   limerick
          WHERE  limerick = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="method" code="mh">
    <description>
      method
    </description>
    <format>
      INSERT method desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="mnt-by" code="mb">
    <description>
      The identifier of a registered mntner object used for
      authorization and authentication.
    </description>
    <format>
      &lt;mntner&gt;
    </format>

    <representation> 
    <sqltable name="mnt_by">
      <insert qtype="ud_aux__">
        INSERT mnt_by 
        SELECT %d, %ld, mntner.object_id, %d 
        FROM mntner WHERE mntner.mntner='%s'
      </insert>
      <update qtype="ud_ax_mt">
        UPDATE mnt_by
        SET thread_id=%d
        WHERE object_id=%ld
        AND mnt_id=%ld
      </update>
      <dummy qtype="ud_ax_mt">
        INSERT mntner 
        SET thread_id=%d, object_id=%ld, mntner='%s', dummy=1
      </dummy>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <foreign value="mt"/>

      <queries>
        <sqlquery keytype="wk_mntner" class="ANY">
          SELECT i.object_id
          FROM   mntner, mnt_by i
          WHERE  mntner.object_id = i.mnt_id
          AND    mntner.mntner = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="mnt-lower" code="ml">
    <description>
      The identifier of a registered mntner object used for
      hierarchical authorization and authentication.
    </description>
    <format>
      &lt;mntner&gt;
    </format>

    <representation> 
    <sqltable name="mnt_lower">
      <insert qtype="ud_aux__">
        INSERT mnt_lower 
        SELECT %d, %ld, mntner.object_id, %d 
        FROM mntner 
        WHERE mntner.mntner='%s'
      </insert>
      <update qtype="ud_ax_mt">
        UPDATE mnt_lower
        SET thread_id=%d
        WHERE object_id=%ld
        AND mnt_id=%ld
      </update>
      <dummy qtype="ud_ax_mt">
        INSERT mntner 
        SET thread_id=%d, object_id=%ld, mntner='%s', dummy=1
      </dummy>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <foreign value="mt"/>

      <queries>
        <sqlquery keytype="wk_mntner" class="ANY">
          SELECT i.object_id
          FROM   mntner, mnt_lower i
          WHERE  mntner.object_id = i.mnt_id
          AND    mntner.mntner  = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="member-of" code="mo">
    <description>
      member-of
    </description>
    <format>
       INSERT member-of desc here.
     </format>

    <representation> 
    <sqltable name="member_of">
      <insert qtype="ud_ax_mo">
        INSERT member_of 
        SELECT %d, %ld, %s.object_id, %d 
        FROM %s 
        WHERE %s.%s='%s'
      </insert>
      <update qtype="ud_ax_mo">
        UPDATE member_of 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND set_id=%ld
      </update>
      <dummy qtype="ud_ax_mo">
        INSERT %s 
        SET thread_id=%d, object_id=%ld, %s='%s', dummy=1
      </dummy>
    </sqltable>
    </representation>

    <keys searchable="inverse">

      <queries>
        <sqlquery keytype="wk_routesetname" class="ir">
          SELECT member_of.object_id
          FROM   route_set, member_of
          WHERE  route_set.object_id = member_of.set_id
          AND    route_set='%s'
	  AND	 route_set.thread_id = 0
        </sqlquery>
        <sqlquery keytype="wk_assetname" class="ir">
          SELECT member_of.object_id
          FROM   as_set, member_of
          WHERE  as_set.object_id = member_of.set_id
          AND    as_set='%s'
	  AND	 as_set.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
   </ripe_attribute>

  <ripe_attribute name="mbrs-by-ref" code="mr">
    <description>
      mbrs-by-ref
    </description>
    <format>
      INSERT mbrs-by-ref desc here.
    </format>

    <representation> 
    <sqltable name="mbrs_by_ref">
      <insert qtype="ud_ax_mr">
        INSERT mbrs_by_ref 
        SELECT %d, %ld, mntner.object_id, %d 
        FROM mntner 
        WHERE mntner.mntner='%s'
      </insert>
      <update qtype="ud_ax_mr">
        UPDATE mbrs_by_ref
        SET thread_id=%d
        WHERE object_id=%ld
        AND mnt_id=%ld
      </update>
      <dummy qtype="ud_ax_mt">
        INSERT mntner 
        SET thread_id=%d, object_id=%ld, mntner='%s', dummy=1
      </dummy>
    </sqltable>
    </representation>

    <keys searchable="inverse">

    </keys>
  </ripe_attribute>

  <ripe_attribute name="members" code="ms">
    <description>
      members
    </description>
    <format>
      INSERT members desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="mntner" code="mt">
    <description>
      The name of a mntner object.  Must be an unique mntner
      name, but can be identical to AS names, nic-handles.
    </description>
    <format>
      &lt;uppercase letter&gt;&lt;uppercase alphanumeric, "-"&gt;
    </format>

    <representation> 
    <sqltable name="mntner">
      <insert qtype="ud_main_">
        INSERT mntner 
        SET thread_id=%d, object_id=%ld, mntner='%s', dummy=0
      </insert>
      <update qtype="ud_main_">
        UPDATE mntner
        SET thread_id=%d
        WHERE object_id=%ld
      </update>
      <select qtype="ud_main_">
        mntner='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>

      <queries>
        <sqlquery keytype="wk_mntner">
          SELECT object_id
          FROM   mntner
          WHERE  mntner = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="mnt-nfy" code="mn">
    <description>
      The e-mail address to be notified when an object
      protected by a mntner is successfully updated.
    </description>
    <format>
      RFC-822 address.
    </format>

    <representation> 
    <sqltable name="mnt_nfy">
      <insert qtype="ud_leaf_">
        INSERT mnt_nfy 
        SET thread_id=%d, object_id=%ld, mnt_nfy='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE mnt_nfy 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND mnt_nfy='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="inverse">

    </keys>

  </ripe_attribute>

  <ripe_attribute name="mnt-routes" code="mu">
    <description>
      An additional maintainer reference can occur through a new attribute,
      "mnt-routes", and is used in aut-num, inetnum and route objects.  The
      "mnt-routes" attribute is an extension to RPSL and is described in
      detail in Section 10.

      A mnt-routes attribute in an aut-num object allows addition of route
      objects with that AS number as the origin to the maintainers listed.
      A mnt-routes attribute in an inetnum object allows addition of route
      objects with exact matching or more specific prefixes.  A mnt-routes
      attribute in a route object allows addition of route objects with
      exact matching or more specific prefixes.  A mnt-routes attribute
      does not allow changes to the aut-num, inetnum, or route object where
      it appears.  A mnt-routes may optionally be constrained to only apply
      to a subset of more specific routes.

      Where "mnt-routes" or "mnt-lower" are applicable, any maintainer
      referenced in the "mnt-by" still apply.  The set of applicable
      maintainers for whatever check is being made is the union of the
      "mnt-routes" or "mnt-lower" and the "mnt-by".  For example, when
      authorizing a route object software would look at "mnt-routes", if it
      does not exist, look at "mnt-lower", if that does not exist look at
      "mnt-by".
    </description>
    <format>
      INSERT mnt-routes format here.
    </format>

    <representation> 
    <sqltable name="mnt_routes">
      <insert qtype="ud_ax_mu">
        INSERT mnt_routes 
        SELECT %d, %ld, mntner.object_id, '%s', %d 
        FROM mntner 
        WHERE mntner.mntner='%s'
      </insert>
      <update qtype="ud_ax_mt">
        UPDATE mnt_routes
        SET thread_id=%d
        WHERE object_id=%ld
        AND mnt_id=%ld
      </update>
      <dummy qtype="ud_ax_mt">
        INSERT mntner 
        SET thread_id=%d, object_id=%ld, mntner='%s', dummy=1
      </dummy>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <foreign value="mt"/>

      <queries>
        <sqlquery keytype="wk_mntner" class="ANY">
          SELECT i.object_id
          FROM   mntner, mnt_routes i
          WHERE  mntner.object_id = i.mnt_id
          AND    mntner.mntner  = '%s'
        </sqlquery>
      </queries>
    </keys>  </ripe_attribute>

  <ripe_attribute name="netname" code="na">
    <description>
      The name of a range of IP address space.
    </description>
    <format>
      &lt;uppercase letter&gt;&lt;uppercase alphanumeric, "-"&gt;
    </format>

    <representation> 
    <sqltable name="inetnum">
      <insert qtype="ud_ma_u2">
        UPDATE %s 
        SET thread_id=%d, netname='%s' 
        WHERE object_id=%ld
      </insert>
      <update qtype="ud_ma_u2">
        UPDATE %s 
        SET thread_id=%d, netname='%s' 
        WHERE object_id=%ld
      </update>
    </sqltable>
    </representation>

    <keys searchable="lookup">

      <queries>
        <sqlquery keytype="wk_netname" class="in">
          SELECT object_id
          FROM   inetnum
          WHERE  netname = '%s'	
	  AND	 thread_id = 0
        </sqlquery>
        <sqlquery keytype="wk_net6name" class="i6">
          SELECT object_id
          FROM   inet6num
          WHERE  netname = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="nic-hdl" code="nh">
    <description>
      The NIC handle of a role or person object.
      This can be a RIPE NIC-handle or a NIC-handle
      assigned by other regional registries.
    </description>
    <format>
      RIPE NIC-handle: &lt;Initials&gt;&lt;0-999&gt;-RIPE
    </format>

    <representation> 
    <sqltable name="person_role">
      <insert qtype="ud_ma_pr">
        INSERT person_role 
        SET thread_id=%d, object_type=%d, object_id=%ld, nic_hdl='%s', dummy=0
      </insert>
      <update qtype="ud_ma_pr">
        UPDATE person_role 
        SET thread_id=%d, object_type=%d 
        WHERE object_id=%ld 
      </update>
      <select qtype="ud_main_">
        nic_hdl='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>

      <queries>
        <sqlquery keytype="wk_nic_hdl" class="pn">
          SELECT object_id
          FROM   person_role
          WHERE  nic_hdl = '%s'
          AND    object_type = $(C_PN)
	  AND	 thread_id = 0
        </sqlquery>
        <sqlquery keytype="wk_nic_hdl" class="ro">
          SELECT object_id
          FROM   person_role
          WHERE  nic_hdl = '%s'
          AND    object_type = $(C_RO)
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="nserver" code="ns">
    <description>
      List of nameservers for a domain object; a minimum
      of two is mandatory .
    </description>
    <format>
      &lt;Fully qualified domain name(s) without trailing "."&gt;
      OR &lt;IP Address(es) of the nameserver(s)&gt;
    </format>

    <representation> 
    <sqltable name="nserver">
      <insert qtype="ud_leaf_">
        INSERT nserver 
        SET thread_id=%d, object_id=%ld, host='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE nserver 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND host='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <queries>
        <sqlquery keytype="wk_domain" class="dn">
          SELECT object_id
          FROM   nserver
          WHERE  host = '%s'
	  AND	 thread_id = 0
        </sqlquery>
        <sqlquery keytype="wk_ipaddress" class="dn">
          SELECT object_id
          FROM   nserver
          WHERE  host = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="notify" code="ny">
    <description>
      The e-mail address to which notifications of changes to
      an object should be sent.
    </description>
    <format>
      &lt;RFC-822 address&gt;
    </format>

    <representation> 
    <sqltable name="notify">
      <insert qtype="ud_lf_ot">
        INSERT notify 
        SET thread_id=%d, object_id=%ld, object_type=%d, notify='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE notify 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND notify='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="inverse">

      <queries>
        <sqlquery keytype="wk_email" class="ANY">
          SELECT object_id
          FROM   notify i
          WHERE  i.notify = '%s'
	  AND	 i.thread_id = 0	
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="origin" code="or">
    <description>
      origin
    </description>
    <format>
      INSERT origin desc here.
    </format>

    <representation> 
    <sqltable name="route">
      <insert qtype="ud_ma_or">
        UPDATE route 
        SET thread_id=%d, origin='%s' 
        WHERE object_id=%ld
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_main_">
        origin='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <primary/>

      <queries>
        <sqlquery keytype="wk_autnum" class="rt">
          SELECT object_id
          FROM   route
          WHERE  origin = '%s' 
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="owner" code="ow">
    <description>
      owner
    </description>
    <format>
      INSERT owner desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="peer" code="pe">
    <description>
      Details of any (interior or exterior) router peerings.
    </description>
    <format>
      &lt;Peer address&gt; &lt;Peer AS&gt; &lt;Routing Protocol&gt; [Local AS]
      [Local AS] is optional.
    </format>
  </ripe_attribute>

  <ripe_attribute name="peering" code="pg">
    <description>
      peering
    </description>
    <format>
      INSERT peering desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="phone" code="ph">
    <description>
      Telephone number
    </description>
    <format>
      + &lt;Country Code&gt;&lt;Area Code&gt;&lt;Phone Number&gt;
      + &lt;Country Code&gt;&lt;Area Code&gt;&lt;Phone Number&gt; ext. &lt;number&gt;
      Optional: spaces may be used to split up the phone number
      into its constituent components. "." characters can also
      be used between to separate the digits.
    </format>
  </ripe_attribute>

  <ripe_attribute name="protocol" code="pl">
    <description>
      protocol
    </description>
    <format>
      INSERT protocol desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="person" code="pn">
    <description>
      The full name of an adminstrative, technical or zone
      contact person specified in another object.
      Do not use titles such as"Dr.", "Prof.", "Mv.",
      "Ms.", "Mr.", etc.
    </description>
    <format>
      &lt;Personal Name&gt; &lt;Family Name&gt; where each name is
      composed of alphabetic characters.
    </format>

    <representation> 
    <sqltable name="names">
      <insert qtype="ud_lf_ot">
        INSERT names 
        SET thread_id=%d, object_id=%ld, object_type=%d, name='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE names 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND name='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="lookup">

      <queries>
        <sqlquery keytype="wk_name">
          SELECT N00.object_id
          FROM   %s
          WHERE  %s
          AND    N00.object_type = $(C_PN)
	  AND	 N00.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="peering-set" code="ps">
    <description>
      peering-set
    </description>
    <format>
      INSERT peering-set desc here.
    </format>

    <representation> 
    <sqltable name="peering_set">
      <insert qtype="ud_main_">
        INSERT peering_set 
        SET thread_id=%d, object_id=%ld, peering_set='%s'
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_main_">
        peering_set='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>
      <queries>
        <sqlquery keytype="wk_peeringset">
	SELECT object_id
	FROM   peering_set 
	WHERE  peering_set='%s'
	AND    thread_id=0
	</sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="refer" code="rf">
    <description>
      Whois referral for domain objects
    </description>
    <format>
      &lt;Type&gt; &lt;host&gt; &lt;port&gt;
      &lt;Type&gt; is one of RIPE, Internic or SIMPLE. Specifies whois
      query style.
      &lt;host&gt; specifies the host to be queried.
      &lt;port&gt; the TCP port number (optional: 43 is the default)
    </format>

    <representation> 
    <sqltable name="refer">
      <insert qtype="ud_lf_rf">
        INSERT refer 
        SET thread_id=%d, object_id=%ld, type=%d, host='%s', port=%d
      </insert>
      <update qtype="ud_lf_rf">
        UPDATE refer 
        SET thread_id=%d  
        WHERE object_id=%ld 
        AND type=%d 
        AND host='%s' 
        AND port=%d
      </update>
    </sqltable>
    </representation>

    <keys searchable="lookup">

    </keys>
  </ripe_attribute>

  <ripe_attribute name="referral-by" code="rb">
    <description>
      This attribute is required in the maintainer object.  It
      may never be altered after the addition of the maintainer.  This
      attribute refers to the maintainer that created this maintainer.
      It may be multiple if more than one signature appeared on the
      transaction creating the object.
    </description>
    <format>
      INSERT referral-by format here.
    </format>
    <representation> 
    <sqltable name="referral_by">
      <insert qtype="ud_aux__">
        INSERT referral_by 
        SELECT %d, %ld, mntner.object_id, %d 
        FROM mntner WHERE mntner.mntner='%s'
      </insert>
      <update qtype="ud_ax_mt">
        UPDATE referral_by
        SET thread_id=%d
        WHERE object_id=%ld
        AND mnt_id=%ld
      </update>
      <dummy qtype="ud_ax_mt">
        INSERT mntner 
        SET thread_id=%d, object_id=%ld, mntner='%s', dummy=1
      </dummy>
    </sqltable>
    </representation>	

    <keys searchable="inverse">
      <foreign value="mt"/>
      <queries>
        <sqlquery keytype="wk_mntner" class="ANY">
          SELECT i.object_id
          FROM   mntner, referral_by i
          WHERE  mntner.object_id = i.mnt_id
          AND    mntner.mntner = '%s'
          AND    i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>


  </ripe_attribute>

  <ripe_attribute name="remarks" code="rm">
    <description>
      General remarks. Can include an URL or RFC822
      address (if preceeded by mailto:).
    </description>
    <format>
      &lt;free text&gt;
    </format>
  </ripe_attribute>

  <ripe_attribute name="role" code="ro">
    <description>
      The full name of a role entity e.g. RIPE DBM.
    </description>
    <format>
      Two components, each consisting of alphabetic
      characters. Note: there is no "-" character
      between the two components of the the name.
    </format>

    <representation> 
    <sqltable name="names">
      <insert qtype="ud_lf_ot">
        INSERT names 
        SET thread_id=%d, object_id=%ld, object_type=%d, name='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE names 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND name='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="lookup">

      <queries>
        <sqlquery keytype="wk_name">
          SELECT N00.object_id
          FROM   %s
          WHERE  %s
          AND    N00.object_type = $(C_RO)
	  AND	 N00.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="rp-attribute" code="rp">
    <description>
      rp-attribute
    </description>
    <format>
      INSERT rp-attribute desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="route-set" code="rs">
    <description>
      route-set
    </description>
    <format>
      INSERT route-set desc here.
    </format>

    <representation> 
    <sqltable name="route_set">
      <insert qtype="ud_main_">
        INSERT route_set 
        SET thread_id=%d, object_id=%ld, route_set='%s', dummy=0
      </insert>
      <update qtype="ud_main_">
        UPDATE route_set
        SET thread_id=%d
        WHERE object_id=%ld
      </update>
      <select qtype="ud_main_">
        route_set='%s' AND
      </select>
    </sqltable>
    </representation>

    <keys searchable="lookup">
      <primary/>

      <queries>
        <sqlquery keytype="wk_routesetname">
          SELECT object_id
          FROM   route_set
          WHERE  route_set = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="route" code="rt">
    <description>
      A route being anounced.
    </description>
    <format>
      Classless prefix length representation.  &lt;IP num-
      ber&gt;/&lt;prefix length&gt;
    </format>

    <representation> 
    <sqltable name="route">
      <insert qtype="ud_ma_rt">
        INSERT route 
        SET thread_id=%d, object_id=%ld, prefix=%u, prefix_length=%d, dummy=0
      </insert>
      <update qtype="ud_main_"></update>
      <select qtype="ud_ma_rt">
        prefix=%u AND prefix_length=%d AND
      </select>
    </sqltable>	
    <radixtrees family="RX_FAM_RT">
	     <IP_V4>
		SELECT  object_id,prefix,prefix_length,origin   
		FROM route
	     </IP_V4>
	</radixtrees>
    </representation>

    <keys searchable="lookup">
      <primary/>

      <queries>
        <radixquery keytype="wk_iprange"   space="IP_V4" />
	<radixquery keytype="wk_ipprefix"  space="IP_V4" />
	<radixquery keytype="wk_ipaddress" space="IP_V4" />
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="rev-srv" code="rz">
    <description>
      Domain name server for a range of IP addresses.
    </description>
    <format>
      Fully qualified name without trailing "."
    </format>

    <representation> 
    <sqltable name="rev_srv">
      <insert qtype="ud_lf_ot">
        INSERT rev_srv 
        SET thread_id=%d, object_id=%ld, object_type=%d, rev_srv='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE rev_srv 
        SET thread_id=%d
        WHERE object_id=%ld 
        AND rev_srv='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="inverse">

      <queries>
        <sqlquery keytype="wk_domain" class="in">
          SELECT object_id
          FROM   rev_srv
          WHERE  rev_srv = '%s' 	
	  AND	 thread_id = 0
        </sqlquery>
<!--        <sqlquery keytype="wk_domain" class="i6">
          SELECT i6_id
          FROM   i6_rev_srv
          WHERE  rev_srv = '%s' 
	  AND	 thread_id = 0
        </sqlquery>
-->
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="sub-dom" code="sd">
    <description>
      List of the sub-domains of a domain
    </description>
    <format>
      &lt;Relative domain name to the domain&gt;
    </format>

    <representation> 
    <sqltable name="sub_dom">
      <insert qtype="ud_leaf_">
        INSERT sub_dom 
        SET thread_id=%d, object_id=%ld, domain='%s'
      </insert>
      <update qtype="ud_leaf_">
        UPDATE sub_dom 
        SET thread_id=%d 
        WHERE object_id=%ld 
        AND domain='%s'
      </update>
    </sqltable>
    </representation>

    <keys searchable="inverse">

      <queries>
        <sqlquery keytype="wk_domain" class="dn">
          SELECT object_id
          FROM   sub_dom
          WHERE  domain = '%s'
	  AND	 thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="source" code="so">
    <description>
      Identifier of the database containing
      authoritative data for this object.
      Use RIPE for objects in the RIPE Database.
    </description>
    <format>
      Uppercase Text.
    </format>
  </ripe_attribute>

  <ripe_attribute name="status" code="st">
    <description>
      status
    </description>
    <format>
      INSERT status desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="trouble" code="tb">
    <description>
      Information on who to contact when there are problems.
    </description>
    <format>
      &lt;Free text&gt;
    </format>
  </ripe_attribute>

  <ripe_attribute name="typedef" code="td">
    <description>
      typedef
    </description>
    <format>
      INSERT typedef desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="tech-c" code="tc">
    <description>
      A technical contact.
    </description>
    <format>
      &lt;NIC-handle&gt;
    </format>

    <representation> 
    <sqltable name="tech_c">
      <insert qtype="ud_aux__">
        INSERT tech_c 
        SELECT %d, %ld, person_role.object_id, %d 
        FROM person_role 
        WHERE person_role.nic_hdl='%s'
      </insert>
      <update qtype="ud_ax_pr">
        UPDATE tech_c
        SET thread_id=%d
        WHERE object_id=%ld
        AND pe_ro_id=%ld
      </update>
      <dummy qtype="ud_ax_pr">
        INSERT person_role 
        SET thread_id=%d, object_id=%ld, nic_hdl='%s', object_type=%d, dummy=1
      </dummy>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <foreign value="nh"/>

      <queries>
        <sqlquery keytype="wk_name" class="ANY">
          SELECT i.object_id
          FROM   tech_c i, %s
          WHERE  %s
          AND    i.pe_ro_id = N00.object_id
	  AND	 i.thread_id = 0
        </sqlquery>
        <sqlquery keytype="wk_nic_hdl" class="ANY">
          SELECT i.object_id
          FROM   tech_c i, person_role
          WHERE  i.pe_ro_id = person_role.object_id
          AND    person_role.nic_hdl  = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

  <ripe_attribute name="text" code="tx">
    <description>
      Must be humourous, but not malicious
      or insulting. :-)
    </description>
    <format>
      Free Text.
    </format>
  </ripe_attribute>

  <ripe_attribute name="withdrawn" code="wd">
    <description>
      withdrawn
    </description>
    <format>
      INSERT withdrawn desc here.
    </format>
  </ripe_attribute>

  <ripe_attribute name="zone-c" code="zc">
    <description>
      NIC-handle of the person with authority over a zone.
    </description>
    <format>
      &lt;NIC-handle&gt;
    </format>

    <representation> 
    <sqltable name="zone_c">
      <insert qtype="ud_aux__">
        INSERT zone_c 
        SELECT %d, %ld, person_role.object_id, %d 
        FROM person_role 
        WHERE person_role.nic_hdl='%s'
      </insert>
      <update qtype="ud_ax_pr">
        UPDATE zone_c
        SET thread_id=%d
        WHERE object_id=%ld
        AND pe_ro_id=%ld
      </update>
      <dummy qtype="ud_ax_pr">
        INSERT person_role 
        SET thread_id=%d, object_id=%ld, nic_hdl='%s', object_type=%d, dummy=1
      </dummy>
    </sqltable>
    </representation>

    <keys searchable="inverse">
      <foreign value="nh"/>

      <queries>
        <sqlquery keytype="wk_name" class="ANY">
          SELECT i.object_id
          FROM   zone_c i, %s
          WHERE  %s
          AND    i.pe_ro_id = N00.object_id
	  AND	 i.thread_id = 0
        </sqlquery>
        <sqlquery keytype="wk_nic_hdl" class="ANY">
          SELECT i.object_id
          FROM   zone_c i, person_role
          WHERE  i.pe_ro_id = person_role.object_id
          AND    person_role.nic_hdl  = '%s'
	  AND	 i.thread_id = 0
        </sqlquery>
      </queries>
    </keys>
  </ripe_attribute>

</ripe_attributes>
