Advertisement
kamn

Potential Database 1

Feb 1st, 2014
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 8.21 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ -->
  3. <!-- Active URL: http://ondras.zarovi.cz/sql/demo/ -->
  4. <sql>
  5. <datatypes db="mysql">
  6.     <group label="Numeric" color="rgb(238,238,170)">
  7.         <type label="TINYINT" length="0" sql="TINYINT" quote=""/>
  8.         <type label="SMALLINT" length="0" sql="SMALLINT" quote=""/>
  9.         <type label="MEDIUMINT" length="0" sql="MEDIUMINT" quote=""/>
  10.         <type label="INT" length="0" sql="INT" quote=""/>
  11.         <type label="Integer" length="0" sql="INTEGER" quote=""/>
  12.         <type label="BIGINT" length="0" sql="BIGINT" quote=""/>
  13.         <type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/>
  14.         <type label="Single precision" length="0" sql="FLOAT" quote=""/>
  15.         <type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/>
  16.     </group>
  17.  
  18.     <group label="Character" color="rgb(255,200,200)">
  19.         <type label="Char" length="1" sql="CHAR" quote="'"/>
  20.         <type label="Varchar" length="1" sql="VARCHAR" quote="'"/>
  21.         <type label="Text" length="0" sql="MEDIUMTEXT" re="TEXT" quote="'"/>
  22.         <type label="Binary" length="1" sql="BINARY" quote="'"/>
  23.         <type label="Varbinary" length="1" sql="VARBINARY" quote="'"/>
  24.         <type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'"/>
  25.     </group>
  26.  
  27.     <group label="Date &amp; Time" color="rgb(200,255,200)">
  28.         <type label="Date" length="0" sql="DATE" quote="'"/>
  29.         <type label="Time" length="0" sql="TIME" quote="'"/>
  30.         <type label="Datetime" length="0" sql="DATETIME" quote="'"/>
  31.         <type label="Year" length="0" sql="YEAR" quote=""/>
  32.         <type label="Timestamp" length="0" sql="TIMESTAMP" quote="'"/>
  33.     </group>
  34.    
  35.     <group label="Miscellaneous" color="rgb(200,200,255)">
  36.         <type label="ENUM" length="1" sql="ENUM" quote=""/>
  37.         <type label="SET" length="1" sql="SET" quote=""/>
  38.         <type label="Bit" length="0" sql="bit" quote=""/>
  39.     </group>
  40. </datatypes><table x="331" y="151" name="Jurisdictions">
  41. <row name="id" null="1" autoincrement="1">
  42. <datatype>INT</datatype>
  43. <default>NULL</default></row>
  44. <row name="name" null="1" autoincrement="0">
  45. <datatype>VARCHAR(100)</datatype>
  46. <default>NULL</default></row>
  47. <row name="boundaries(?)" null="1" autoincrement="0">
  48. <datatype>MEDIUMTEXT</datatype>
  49. <default>NULL</default></row>
  50. <key type="PRIMARY" name="">
  51. <part>id</part>
  52. </key>
  53. <comment>A jurisdiction can be thought of as a city with a unique id and some other basic information.</comment>
  54. </table>
  55. <table x="27" y="194" name="Roles">
  56. <row name="id" null="1" autoincrement="1">
  57. <datatype>TINYINT</datatype>
  58. <default>NULL</default></row>
  59. <row name="type(?)" null="1" autoincrement="0">
  60. <datatype>TINYINT</datatype>
  61. <default>NULL</default></row>
  62. <row name="jurisdiction_id" null="1" autoincrement="0">
  63. <datatype>TINYINT</datatype>
  64. <default>NULL</default><relation table="Jurisdictions" row="id" />
  65. </row>
  66. <row name="agency_id" null="1" autoincrement="0">
  67. <datatype>TINYINT</datatype>
  68. <default>NULL</default><relation table="Agency" row="id" />
  69. </row>
  70. <row name="employee_id" null="1" autoincrement="0">
  71. <datatype>TINYINT</datatype>
  72. <default>NULL</default><relation table="Employee" row="id" />
  73. </row>
  74. <key type="PRIMARY" name="">
  75. <part>id</part>
  76. </key>
  77. </table>
  78. <table x="101" y="405" name="Agency">
  79. <row name="id" null="1" autoincrement="1">
  80. <datatype>TINYINT</datatype>
  81. <default>NULL</default></row>
  82. <row name="jurisdiction_id" null="1" autoincrement="0">
  83. <datatype>TINYINT</datatype>
  84. <default>NULL</default><relation table="Jurisdictions" row="id" />
  85. </row>
  86. <row name="name" null="1" autoincrement="0">
  87. <datatype>VARCHAR(200)</datatype>
  88. <default>NULL</default></row>
  89. <key type="PRIMARY" name="">
  90. <part>id</part>
  91. </key>
  92. </table>
  93. <table x="162" y="25" name="Users">
  94. <row name="id" null="1" autoincrement="1">
  95. <datatype>TINYINT</datatype>
  96. <default>NULL</default></row>
  97. <row name="email" null="1" autoincrement="0">
  98. <datatype>VARCHAR(200)</datatype>
  99. <default>NULL</default></row>
  100. <row name="fullname" null="1" autoincrement="0">
  101. <datatype>VARCHAR(200)</datatype>
  102. <default>NULL</default></row>
  103. <row name="role_id" null="1" autoincrement="0">
  104. <datatype>TINYINT</datatype>
  105. <default>NULL</default><relation table="Roles" row="id" />
  106. </row>
  107. <row name="jurisdiction_id(?)" null="1" autoincrement="0">
  108. <datatype>INT</datatype>
  109. <default>NULL</default><relation table="Jurisdictions" row="id" />
  110. <comment>Should a user be bound to a jurisdiction or should we have a roles table with more information?</comment>
  111. </row>
  112. <key type="PRIMARY" name="">
  113. <part>id</part>
  114. </key>
  115. </table>
  116. <table x="677" y="104" name="Services">
  117. <row name="id" null="1" autoincrement="1">
  118. <datatype>TINYINT</datatype>
  119. <default>NULL</default></row>
  120. <row name="service_group_id" null="1" autoincrement="0">
  121. <datatype>TINYINT</datatype>
  122. <default>NULL</default><relation table="ServiceGroups" row="id" />
  123. </row>
  124. <row name="service_name" null="1" autoincrement="0">
  125. <datatype>VARCHAR(200)</datatype>
  126. <default>NULL</default></row>
  127. <row name="description" null="1" autoincrement="0">
  128. <datatype>MEDIUMTEXT</datatype>
  129. <default>NULL</default></row>
  130. <row name="metadata(?)" null="1" autoincrement="0">
  131. <datatype>TINYINT</datatype>
  132. <default>NULL</default></row>
  133. <row name="type(?)" null="1" autoincrement="0">
  134. <datatype>TINYINT</datatype>
  135. <default>NULL</default></row>
  136. <key type="PRIMARY" name="">
  137. <part>id</part>
  138. </key>
  139. <comment>A list of services for each Jurisdiction</comment>
  140. </table>
  141. <table x="499" y="128" name="ServiceGroups">
  142. <row name="id" null="1" autoincrement="1">
  143. <datatype>TINYINT</datatype>
  144. <default>NULL</default></row>
  145. <row name="jurisdiction_id" null="1" autoincrement="0">
  146. <datatype>TINYINT</datatype>
  147. <default>NULL</default><relation table="Jurisdictions" row="id" />
  148. </row>
  149. <row name="name" null="1" autoincrement="0">
  150. <datatype>VARCHAR(200)</datatype>
  151. <default>NULL</default></row>
  152. <key type="PRIMARY" name="">
  153. <part>id</part>
  154. </key>
  155. </table>
  156. <table x="944" y="269" name="ServiceRequests">
  157. <row name="id" null="1" autoincrement="1">
  158. <datatype>TINYINT</datatype>
  159. <default>NULL</default></row>
  160. <row name="service_id" null="1" autoincrement="0">
  161. <datatype>TINYINT</datatype>
  162. <default>NULL</default><relation table="Services" row="id" />
  163. </row>
  164. <row name="agency_id" null="1" autoincrement="0">
  165. <datatype>TINYINT</datatype>
  166. <default>NULL</default><relation table="Agency" row="id" />
  167. </row>
  168. <row name="status" null="1" autoincrement="0">
  169. <datatype>TINYINT</datatype>
  170. <default>NULL</default><comment>A boolean for open or closed</comment>
  171. </row>
  172. <row name="status_notes" null="1" autoincrement="0">
  173. <datatype>MEDIUMTEXT</datatype>
  174. <default>NULL</default></row>
  175. <row name="description(?)" null="1" autoincrement="0">
  176. <datatype>MEDIUMTEXT</datatype>
  177. <default>NULL</default></row>
  178. <row name="address" null="1" autoincrement="0">
  179. <datatype>MEDIUMTEXT</datatype>
  180. <default>NULL</default></row>
  181. <row name="address_id" null="1" autoincrement="0">
  182. <datatype>MEDIUMTEXT</datatype>
  183. <default>NULL</default></row>
  184. <row name="requested_datetime" null="1" autoincrement="0">
  185. <datatype>DATETIME</datatype>
  186. <default>NULL</default></row>
  187. <row name="updated_datetime" null="1" autoincrement="0">
  188. <datatype>DATETIME</datatype>
  189. <default>NULL</default></row>
  190. <row name="expected_datetime" null="1" autoincrement="0">
  191. <datatype>DATETIME</datatype>
  192. <default>NULL</default></row>
  193. <row name="zipcode" null="1" autoincrement="0">
  194. <datatype>SMALLINT</datatype>
  195. <default>NULL</default></row>
  196. <row name="lat" null="1" autoincrement="0">
  197. <datatype>MEDIUMTEXT</datatype>
  198. <default>NULL</default></row>
  199. <row name="long" null="1" autoincrement="0">
  200. <datatype>MEDIUMTEXT</datatype>
  201. <default>NULL</default></row>
  202. <row name="media_url" null="1" autoincrement="0">
  203. <datatype>VARCHAR(300)</datatype>
  204. <default>NULL</default></row>
  205. <key type="PRIMARY" name="">
  206. <part>id</part>
  207. </key>
  208. </table>
  209. <table x="76" y="588" name="Employee">
  210. <row name="id" null="1" autoincrement="1">
  211. <datatype>TINYINT</datatype>
  212. <default>NULL</default></row>
  213. <row name="new field" null="1" autoincrement="0">
  214. <datatype>TINYINT</datatype>
  215. <default>NULL</default></row>
  216. <row name="true_employee_id(?)" null="1" autoincrement="0">
  217. <datatype>TINYINT</datatype>
  218. <default>NULL</default></row>
  219. <key type="PRIMARY" name="">
  220. <part>id</part>
  221. </key>
  222. </table>
  223. </sql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement