Listing 2: Maps the XML Store Elements to Rows in the Stores Table

  <!--previous schema fragment omitted for clarity-->
<ElementType name="store" sql:relation="stores" >
     <AttributeType name="stor_id" />
     <AttributeType name="stor_name" />

     <attribute type="stor_id" sql:field="stor_id" />
     <attribute type="storename" sql:field="stor_name" />
 <element type="discounts" >
  <sql:relationship
   key-relation="store"
   key="stor_id"
   foreign-relation="discounts"
   foreign-key="stor_id" />
   </element>
 </ElementType>