Class RawDataSQLConnection

Z FI WIKI
Přejít na: navigace, hledání
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE RawDataSQLConnection
    SYSTEM "http://kore.fi.muni.cz:5080/projects/pb138/2005/visquery/Query.dtd">
<!--
 ! author: Marek Rychly, xrychly1@fi.muni.cz
-->
<RawDataSQLConnection>
    <table name="provozy">
        <definitionSQL>
            <coldefSQL name="id" sqltype="int" constraint="primary key" />
            <coldefSQL name="nazev" sqltype="varchar(50)" />
        </definitionSQL>
        <row>
            <!-- sloupce v poradi dle definice, NULL je <colval /> -->
            <colval>1</colval><colval>Brno</colval>
        </row>
        <row>
            <colval>2</colval><colval>Praha</colval>
        </row>
        <row>
            <colval>3</colval><colval />
        </row>
    </table>
    <table name="platy_na_vek">
        <definitionSQL>
            <!-- atribut implicit udava, ze sloupec nebude dale naplnovan -->
            <coldefSQL name="id" sqltype="identity" implicit="true" constraint="primary key" />
            <coldefSQL name="id_provozu" sqltype="int" constraint="not null" />
            <coldefSQL name="vek" sqltype="int" />
            <coldefSQL name="plat" sqltype="float" />
            <constraintSQL>foreign key (id_provozu) references provozy(id)</constraintSQL>
        </definitionSQL>
        <row>
            <colval>1</colval><colval>25</colval><colval>27123</colval>
        </row>
        <row>
            <colval>1</colval><colval>30</colval><colval>35588.5</colval>
        </row>
        <row>
            <colval>2</colval><colval>28</colval><colval>32000</colval>
        </row>
    </table>
</RawDataSQLConnection>