Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8" ?>
- <!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ -->
- <!-- Active URL: http://ondras.zarovi.cz/sql/demo/ -->
- <sql>
- <datatypes db="mysql">
- <group label="Numeric" color="rgb(238,238,170)">
- <type label="TINYINT" length="0" sql="TINYINT" quote=""/>
- <type label="SMALLINT" length="0" sql="SMALLINT" quote=""/>
- <type label="MEDIUMINT" length="0" sql="MEDIUMINT" quote=""/>
- <type label="INT" length="0" sql="INT" quote=""/>
- <type label="Integer" length="0" sql="INTEGER" quote=""/>
- <type label="BIGINT" length="0" sql="BIGINT" quote=""/>
- <type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/>
- <type label="Single precision" length="0" sql="FLOAT" quote=""/>
- <type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/>
- </group>
- <group label="Character" color="rgb(255,200,200)">
- <type label="Char" length="1" sql="CHAR" quote="'"/>
- <type label="Varchar" length="1" sql="VARCHAR" quote="'"/>
- <type label="Text" length="0" sql="MEDIUMTEXT" re="TEXT" quote="'"/>
- <type label="Binary" length="1" sql="BINARY" quote="'"/>
- <type label="Varbinary" length="1" sql="VARBINARY" quote="'"/>
- <type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'"/>
- </group>
- <group label="Date & Time" color="rgb(200,255,200)">
- <type label="Date" length="0" sql="DATE" quote="'"/>
- <type label="Time" length="0" sql="TIME" quote="'"/>
- <type label="Datetime" length="0" sql="DATETIME" quote="'"/>
- <type label="Year" length="0" sql="YEAR" quote=""/>
- <type label="Timestamp" length="0" sql="TIMESTAMP" quote="'"/>
- </group>
- <group label="Miscellaneous" color="rgb(200,200,255)">
- <type label="ENUM" length="1" sql="ENUM" quote=""/>
- <type label="SET" length="1" sql="SET" quote=""/>
- <type label="Bit" length="0" sql="bit" quote=""/>
- </group>
- </datatypes><table x="331" y="151" name="Jurisdictions">
- <row name="id" null="1" autoincrement="1">
- <datatype>INT</datatype>
- <default>NULL</default></row>
- <row name="name" null="1" autoincrement="0">
- <datatype>VARCHAR(100)</datatype>
- <default>NULL</default></row>
- <row name="boundaries(?)" null="1" autoincrement="0">
- <datatype>MEDIUMTEXT</datatype>
- <default>NULL</default></row>
- <key type="PRIMARY" name="">
- <part>id</part>
- </key>
- <comment>A jurisdiction can be thought of as a city with a unique id and some other basic information.</comment>
- </table>
- <table x="27" y="194" name="Roles">
- <row name="id" null="1" autoincrement="1">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="type(?)" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="jurisdiction_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="Jurisdictions" row="id" />
- </row>
- <row name="agency_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="Agency" row="id" />
- </row>
- <row name="employee_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="Employee" row="id" />
- </row>
- <key type="PRIMARY" name="">
- <part>id</part>
- </key>
- </table>
- <table x="101" y="405" name="Agency">
- <row name="id" null="1" autoincrement="1">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="jurisdiction_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="Jurisdictions" row="id" />
- </row>
- <row name="name" null="1" autoincrement="0">
- <datatype>VARCHAR(200)</datatype>
- <default>NULL</default></row>
- <key type="PRIMARY" name="">
- <part>id</part>
- </key>
- </table>
- <table x="162" y="25" name="Users">
- <row name="id" null="1" autoincrement="1">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="email" null="1" autoincrement="0">
- <datatype>VARCHAR(200)</datatype>
- <default>NULL</default></row>
- <row name="fullname" null="1" autoincrement="0">
- <datatype>VARCHAR(200)</datatype>
- <default>NULL</default></row>
- <row name="role_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="Roles" row="id" />
- </row>
- <row name="jurisdiction_id(?)" null="1" autoincrement="0">
- <datatype>INT</datatype>
- <default>NULL</default><relation table="Jurisdictions" row="id" />
- <comment>Should a user be bound to a jurisdiction or should we have a roles table with more information?</comment>
- </row>
- <key type="PRIMARY" name="">
- <part>id</part>
- </key>
- </table>
- <table x="677" y="104" name="Services">
- <row name="id" null="1" autoincrement="1">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="service_group_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="ServiceGroups" row="id" />
- </row>
- <row name="service_name" null="1" autoincrement="0">
- <datatype>VARCHAR(200)</datatype>
- <default>NULL</default></row>
- <row name="description" null="1" autoincrement="0">
- <datatype>MEDIUMTEXT</datatype>
- <default>NULL</default></row>
- <row name="metadata(?)" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="type(?)" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <key type="PRIMARY" name="">
- <part>id</part>
- </key>
- <comment>A list of services for each Jurisdiction</comment>
- </table>
- <table x="499" y="128" name="ServiceGroups">
- <row name="id" null="1" autoincrement="1">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="jurisdiction_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="Jurisdictions" row="id" />
- </row>
- <row name="name" null="1" autoincrement="0">
- <datatype>VARCHAR(200)</datatype>
- <default>NULL</default></row>
- <key type="PRIMARY" name="">
- <part>id</part>
- </key>
- </table>
- <table x="944" y="269" name="ServiceRequests">
- <row name="id" null="1" autoincrement="1">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="service_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="Services" row="id" />
- </row>
- <row name="agency_id" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><relation table="Agency" row="id" />
- </row>
- <row name="status" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default><comment>A boolean for open or closed</comment>
- </row>
- <row name="status_notes" null="1" autoincrement="0">
- <datatype>MEDIUMTEXT</datatype>
- <default>NULL</default></row>
- <row name="description(?)" null="1" autoincrement="0">
- <datatype>MEDIUMTEXT</datatype>
- <default>NULL</default></row>
- <row name="address" null="1" autoincrement="0">
- <datatype>MEDIUMTEXT</datatype>
- <default>NULL</default></row>
- <row name="address_id" null="1" autoincrement="0">
- <datatype>MEDIUMTEXT</datatype>
- <default>NULL</default></row>
- <row name="requested_datetime" null="1" autoincrement="0">
- <datatype>DATETIME</datatype>
- <default>NULL</default></row>
- <row name="updated_datetime" null="1" autoincrement="0">
- <datatype>DATETIME</datatype>
- <default>NULL</default></row>
- <row name="expected_datetime" null="1" autoincrement="0">
- <datatype>DATETIME</datatype>
- <default>NULL</default></row>
- <row name="zipcode" null="1" autoincrement="0">
- <datatype>SMALLINT</datatype>
- <default>NULL</default></row>
- <row name="lat" null="1" autoincrement="0">
- <datatype>MEDIUMTEXT</datatype>
- <default>NULL</default></row>
- <row name="long" null="1" autoincrement="0">
- <datatype>MEDIUMTEXT</datatype>
- <default>NULL</default></row>
- <row name="media_url" null="1" autoincrement="0">
- <datatype>VARCHAR(300)</datatype>
- <default>NULL</default></row>
- <key type="PRIMARY" name="">
- <part>id</part>
- </key>
- </table>
- <table x="76" y="588" name="Employee">
- <row name="id" null="1" autoincrement="1">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="new field" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <row name="true_employee_id(?)" null="1" autoincrement="0">
- <datatype>TINYINT</datatype>
- <default>NULL</default></row>
- <key type="PRIMARY" name="">
- <part>id</part>
- </key>
- </table>
- </sql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement