Here's a WIP XML schema file of the database format:

Download Link

Romset schema is not completed yet but should look almost the same. Not being terribly experienced in XML schema creation, it may not be entirely correct and some of the rules may sometimes be too strict or too loose, but it's a start.

For reference, here's how a game element may look:

Code:
<game name="Bird Week" class="Licensed" catalog="TFS-BK" publisher="Toemiland" developer="Lenar" region="Japan" players="1" date="1986-6-3">
  <cartridge system="Famicom" dumper="bootgod" datedumped="2006-12-24" crc="A8A9B982" sha1="22EAF03CC4A148EB7F96CCBDB878170B6D117940">
    <board type="HVC-CNROM" pcb="HVC-CNROM-256K-01" mapper="185">
      <prg name="TFS-BK-0 PRG" size="16k" crc="2A629F7D" sha1="BD0B7D6974CE1E3BC0A8AFB55FEBD0C03332361C"/>
      <chr name="TFS-BK-0 CHR" size="8k" crc="970A934E" sha1="2307A6DAF73984CA4242A93858CAABF9F86469AD">
        <pin number="26" function="CE"/>
        <pin number="27" function="CE"/>
      </chr>
      <chip type="74xx161"/>
      <pad h="1" v="0"/>
    </board>
    <properties>
      <property name="Back Label ID" value="860410"/>
      <property name="Label ID Code" value="TFS-BK"/>
      <property name="Manufacturer ID" value="09"/>
      <property name="Cart Type" value="Standard"/>
      <property name="Cart Producer" value="Famicom"/>
      <property name="Cart Color" value="Aqua"/>
      <property name="Secondary ID" value="FS-2003G"/>
    </properties>
  </cartridge>
</game>

And a minimalistic approach:

Code:
<game>
  <cartridge system="Famicom" crc="A8A9B982" sha1="22EAF03CC4A148EB7F96CCBDB878170B6D117940">
    <board type="HVC-CNROM" mapper="185">
      <prg size="16k" />
      <chr size="8k">
        <pin number="26" function="CE" />
        <pin number="27" function="CE" />
      </chr>
      <pad h="1" v="0" />
    </board>
  </cartridge>
</game>