Model1.ssdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="Хранилище ModelKindergartenEntities" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
  3. <EntityType Name="Attendance">
  4. <Key>
  5. <PropertyRef Name="Id_visit" />
  6. </Key>
  7. <Property Name="Id_visit" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  8. <Property Name="Date_visit" Type="date" Nullable="false" />
  9. <Property Name="Id_child" Type="int" Nullable="false" />
  10. <Property Name="Status_visit" Type="int" Nullable="false" />
  11. </EntityType>
  12. <EntityType Name="Children">
  13. <Key>
  14. <PropertyRef Name="Id_child" />
  15. </Key>
  16. <Property Name="Id_child" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  17. <Property Name="Surname" Type="nvarchar" MaxLength="50" Nullable="false" />
  18. <Property Name="Names" Type="nvarchar" MaxLength="50" Nullable="false" />
  19. <Property Name="Patronymic" Type="nvarchar" MaxLength="50" Nullable="false" />
  20. <Property Name="Birthdate" Type="date" Nullable="false" />
  21. <Property Name="Id_gender" Type="int" Nullable="false" />
  22. <Property Name="Id_group" Type="int" Nullable="false" />
  23. <Property Name="Street" Type="nvarchar" MaxLength="50" Nullable="false" />
  24. <Property Name="Building" Type="nvarchar" MaxLength="10" Nullable="false" />
  25. <Property Name="Photo" Type="nvarchar" MaxLength="100" />
  26. </EntityType>
  27. <EntityType Name="Distributions">
  28. <Key>
  29. <PropertyRef Name="Id_distribution" />
  30. </Key>
  31. <Property Name="Id_distribution" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  32. <Property Name="Id_employee" Type="int" Nullable="false" />
  33. <Property Name="Id_group" Type="int" Nullable="false" />
  34. </EntityType>
  35. <EntityType Name="Employees">
  36. <Key>
  37. <PropertyRef Name="Id_employee" />
  38. </Key>
  39. <Property Name="Id_employee" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  40. <Property Name="Surname" Type="nvarchar" MaxLength="50" Nullable="false" />
  41. <Property Name="Names" Type="nvarchar" MaxLength="50" Nullable="false" />
  42. <Property Name="Patronymic" Type="nvarchar" MaxLength="50" Nullable="false" />
  43. <Property Name="Birthdate" Type="date" Nullable="false" />
  44. <Property Name="Id_gender" Type="int" Nullable="false" />
  45. <Property Name="Id_position" Type="int" Nullable="false" />
  46. <Property Name="Street" Type="nvarchar" MaxLength="50" Nullable="false" />
  47. <Property Name="Building" Type="nvarchar" MaxLength="10" Nullable="false" />
  48. <Property Name="Phone" Type="nvarchar" MaxLength="20" Nullable="false" />
  49. <Property Name="Login_user" Type="nvarchar" MaxLength="20" Nullable="false" />
  50. <Property Name="Password_user" Type="int" Nullable="false" />
  51. <Property Name="Id_role" Type="int" Nullable="false" />
  52. </EntityType>
  53. <EntityType Name="Genders">
  54. <Key>
  55. <PropertyRef Name="Id_gender" />
  56. </Key>
  57. <Property Name="Id_gender" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  58. <Property Name="Gender" Type="nvarchar" MaxLength="10" Nullable="false" />
  59. </EntityType>
  60. <EntityType Name="Groups">
  61. <Key>
  62. <PropertyRef Name="Id_group" />
  63. </Key>
  64. <Property Name="Id_group" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  65. <Property Name="Id_type" Type="int" Nullable="false" />
  66. <Property Name="Code" Type="int" Nullable="false" />
  67. </EntityType>
  68. <EntityType Name="Kinships">
  69. <Key>
  70. <PropertyRef Name="Id_kinship" />
  71. </Key>
  72. <Property Name="Id_kinship" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  73. <Property Name="Id_parent" Type="int" Nullable="false" />
  74. <Property Name="Id_child" Type="int" Nullable="false" />
  75. </EntityType>
  76. <EntityType Name="Parents">
  77. <Key>
  78. <PropertyRef Name="Id_parent" />
  79. </Key>
  80. <Property Name="Id_parent" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  81. <Property Name="Surname" Type="nvarchar" MaxLength="50" Nullable="false" />
  82. <Property Name="Names" Type="nvarchar" MaxLength="50" Nullable="false" />
  83. <Property Name="Patronymic" Type="nvarchar" MaxLength="50" Nullable="false" />
  84. <Property Name="Birthdate" Type="date" Nullable="false" />
  85. <Property Name="Id_gender" Type="int" Nullable="false" />
  86. <Property Name="Street" Type="nvarchar" MaxLength="50" Nullable="false" />
  87. <Property Name="Building" Type="nvarchar" MaxLength="10" Nullable="false" />
  88. <Property Name="Phone" Type="nvarchar" MaxLength="20" Nullable="false" />
  89. </EntityType>
  90. <EntityType Name="Positions">
  91. <Key>
  92. <PropertyRef Name="Id_position" />
  93. </Key>
  94. <Property Name="Id_position" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  95. <Property Name="Position" Type="nvarchar" MaxLength="50" Nullable="false" />
  96. </EntityType>
  97. <EntityType Name="Roles">
  98. <Key>
  99. <PropertyRef Name="Id_role" />
  100. </Key>
  101. <Property Name="Id_role" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  102. <Property Name="Role_name" Type="nvarchar" MaxLength="20" Nullable="false" />
  103. </EntityType>
  104. <EntityType Name="Sertificates">
  105. <Key>
  106. <PropertyRef Name="Id_sertificate" />
  107. </Key>
  108. <Property Name="Id_sertificate" Type="int" Nullable="false" />
  109. <Property Name="Series" Type="nvarchar" MaxLength="10" Nullable="false" />
  110. <Property Name="Number" Type="int" Nullable="false" />
  111. <Property Name="Date_issue" Type="date" Nullable="false" />
  112. <Property Name="Iddued" Type="nvarchar" MaxLength="100" Nullable="false" />
  113. </EntityType>
  114. <EntityType Name="Types_group">
  115. <Key>
  116. <PropertyRef Name="Id_type" />
  117. </Key>
  118. <Property Name="Id_type" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  119. <Property Name="Type_group" Type="nvarchar" MaxLength="50" Nullable="false" />
  120. </EntityType>
  121. <Association Name="FK__Attendanc__Id_ch__5F7E2DAC">
  122. <End Role="Children" Type="Self.Children" Multiplicity="1" />
  123. <End Role="Attendance" Type="Self.Attendance" Multiplicity="*" />
  124. <ReferentialConstraint>
  125. <Principal Role="Children">
  126. <PropertyRef Name="Id_child" />
  127. </Principal>
  128. <Dependent Role="Attendance">
  129. <PropertyRef Name="Id_child" />
  130. </Dependent>
  131. </ReferentialConstraint>
  132. </Association>
  133. <Association Name="FK__Children__Id_gen__5BAD9CC8">
  134. <End Role="Genders" Type="Self.Genders" Multiplicity="1" />
  135. <End Role="Children" Type="Self.Children" Multiplicity="*" />
  136. <ReferentialConstraint>
  137. <Principal Role="Genders">
  138. <PropertyRef Name="Id_gender" />
  139. </Principal>
  140. <Dependent Role="Children">
  141. <PropertyRef Name="Id_gender" />
  142. </Dependent>
  143. </ReferentialConstraint>
  144. </Association>
  145. <Association Name="FK__Children__Id_gro__5CA1C101">
  146. <End Role="Groups" Type="Self.Groups" Multiplicity="1" />
  147. <End Role="Children" Type="Self.Children" Multiplicity="*" />
  148. <ReferentialConstraint>
  149. <Principal Role="Groups">
  150. <PropertyRef Name="Id_group" />
  151. </Principal>
  152. <Dependent Role="Children">
  153. <PropertyRef Name="Id_group" />
  154. </Dependent>
  155. </ReferentialConstraint>
  156. </Association>
  157. <Association Name="FK__Distribut__Id_em__39237A9A">
  158. <End Role="Employees" Type="Self.Employees" Multiplicity="1" />
  159. <End Role="Distributions" Type="Self.Distributions" Multiplicity="*" />
  160. <ReferentialConstraint>
  161. <Principal Role="Employees">
  162. <PropertyRef Name="Id_employee" />
  163. </Principal>
  164. <Dependent Role="Distributions">
  165. <PropertyRef Name="Id_employee" />
  166. </Dependent>
  167. </ReferentialConstraint>
  168. </Association>
  169. <Association Name="FK__Distribut__Id_gr__3A179ED3">
  170. <End Role="Groups" Type="Self.Groups" Multiplicity="1" />
  171. <End Role="Distributions" Type="Self.Distributions" Multiplicity="*" />
  172. <ReferentialConstraint>
  173. <Principal Role="Groups">
  174. <PropertyRef Name="Id_group" />
  175. </Principal>
  176. <Dependent Role="Distributions">
  177. <PropertyRef Name="Id_group" />
  178. </Dependent>
  179. </ReferentialConstraint>
  180. </Association>
  181. <Association Name="FK__Employees__Id_ge__1E6F845E">
  182. <End Role="Genders" Type="Self.Genders" Multiplicity="1" />
  183. <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
  184. <ReferentialConstraint>
  185. <Principal Role="Genders">
  186. <PropertyRef Name="Id_gender" />
  187. </Principal>
  188. <Dependent Role="Employees">
  189. <PropertyRef Name="Id_gender" />
  190. </Dependent>
  191. </ReferentialConstraint>
  192. </Association>
  193. <Association Name="FK__Employees__Id_po__1F63A897">
  194. <End Role="Positions" Type="Self.Positions" Multiplicity="1" />
  195. <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
  196. <ReferentialConstraint>
  197. <Principal Role="Positions">
  198. <PropertyRef Name="Id_position" />
  199. </Principal>
  200. <Dependent Role="Employees">
  201. <PropertyRef Name="Id_position" />
  202. </Dependent>
  203. </ReferentialConstraint>
  204. </Association>
  205. <Association Name="FK__Employees__Id_ro__2057CCD0">
  206. <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
  207. <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
  208. <ReferentialConstraint>
  209. <Principal Role="Roles">
  210. <PropertyRef Name="Id_role" />
  211. </Principal>
  212. <Dependent Role="Employees">
  213. <PropertyRef Name="Id_role" />
  214. </Dependent>
  215. </ReferentialConstraint>
  216. </Association>
  217. <Association Name="FK__Groups__Id_type__4E53A1AA">
  218. <End Role="Types_group" Type="Self.Types_group" Multiplicity="1" />
  219. <End Role="Groups" Type="Self.Groups" Multiplicity="*" />
  220. <ReferentialConstraint>
  221. <Principal Role="Types_group">
  222. <PropertyRef Name="Id_type" />
  223. </Principal>
  224. <Dependent Role="Groups">
  225. <PropertyRef Name="Id_type" />
  226. </Dependent>
  227. </ReferentialConstraint>
  228. </Association>
  229. <Association Name="FK__Kinships__Id_chi__70A8B9AE">
  230. <End Role="Children" Type="Self.Children" Multiplicity="1" />
  231. <End Role="Kinships" Type="Self.Kinships" Multiplicity="*" />
  232. <ReferentialConstraint>
  233. <Principal Role="Children">
  234. <PropertyRef Name="Id_child" />
  235. </Principal>
  236. <Dependent Role="Kinships">
  237. <PropertyRef Name="Id_child" />
  238. </Dependent>
  239. </ReferentialConstraint>
  240. </Association>
  241. <Association Name="FK__Kinships__Id_par__6FB49575">
  242. <End Role="Parents" Type="Self.Parents" Multiplicity="1" />
  243. <End Role="Kinships" Type="Self.Kinships" Multiplicity="*" />
  244. <ReferentialConstraint>
  245. <Principal Role="Parents">
  246. <PropertyRef Name="Id_parent" />
  247. </Principal>
  248. <Dependent Role="Kinships">
  249. <PropertyRef Name="Id_parent" />
  250. </Dependent>
  251. </ReferentialConstraint>
  252. </Association>
  253. <Association Name="FK__Parents__Id_gend__6CD828CA">
  254. <End Role="Genders" Type="Self.Genders" Multiplicity="1" />
  255. <End Role="Parents" Type="Self.Parents" Multiplicity="*" />
  256. <ReferentialConstraint>
  257. <Principal Role="Genders">
  258. <PropertyRef Name="Id_gender" />
  259. </Principal>
  260. <Dependent Role="Parents">
  261. <PropertyRef Name="Id_gender" />
  262. </Dependent>
  263. </ReferentialConstraint>
  264. </Association>
  265. <Association Name="FK_Sertificates_Children">
  266. <End Role="Children" Type="Self.Children" Multiplicity="1" />
  267. <End Role="Sertificates" Type="Self.Sertificates" Multiplicity="0..1" />
  268. <ReferentialConstraint>
  269. <Principal Role="Children">
  270. <PropertyRef Name="Id_child" />
  271. </Principal>
  272. <Dependent Role="Sertificates">
  273. <PropertyRef Name="Id_sertificate" />
  274. </Dependent>
  275. </ReferentialConstraint>
  276. </Association>
  277. <EntityContainer Name="Хранилище ModelKindergartenEntitiesContainer">
  278. <EntitySet Name="Attendance" EntityType="Self.Attendance" Schema="dbo" store:Type="Tables" />
  279. <EntitySet Name="Children" EntityType="Self.Children" Schema="dbo" store:Type="Tables" />
  280. <EntitySet Name="Distributions" EntityType="Self.Distributions" Schema="dbo" store:Type="Tables" />
  281. <EntitySet Name="Employees" EntityType="Self.Employees" Schema="dbo" store:Type="Tables" />
  282. <EntitySet Name="Genders" EntityType="Self.Genders" Schema="dbo" store:Type="Tables" />
  283. <EntitySet Name="Groups" EntityType="Self.Groups" Schema="dbo" store:Type="Tables" />
  284. <EntitySet Name="Kinships" EntityType="Self.Kinships" Schema="dbo" store:Type="Tables" />
  285. <EntitySet Name="Parents" EntityType="Self.Parents" Schema="dbo" store:Type="Tables" />
  286. <EntitySet Name="Positions" EntityType="Self.Positions" Schema="dbo" store:Type="Tables" />
  287. <EntitySet Name="Roles" EntityType="Self.Roles" Schema="dbo" store:Type="Tables" />
  288. <EntitySet Name="Sertificates" EntityType="Self.Sertificates" Schema="dbo" store:Type="Tables" />
  289. <EntitySet Name="Types_group" EntityType="Self.Types_group" Schema="dbo" store:Type="Tables" />
  290. <AssociationSet Name="FK__Attendanc__Id_ch__5F7E2DAC" Association="Self.FK__Attendanc__Id_ch__5F7E2DAC">
  291. <End Role="Children" EntitySet="Children" />
  292. <End Role="Attendance" EntitySet="Attendance" />
  293. </AssociationSet>
  294. <AssociationSet Name="FK__Children__Id_gen__5BAD9CC8" Association="Self.FK__Children__Id_gen__5BAD9CC8">
  295. <End Role="Genders" EntitySet="Genders" />
  296. <End Role="Children" EntitySet="Children" />
  297. </AssociationSet>
  298. <AssociationSet Name="FK__Children__Id_gro__5CA1C101" Association="Self.FK__Children__Id_gro__5CA1C101">
  299. <End Role="Groups" EntitySet="Groups" />
  300. <End Role="Children" EntitySet="Children" />
  301. </AssociationSet>
  302. <AssociationSet Name="FK__Distribut__Id_em__39237A9A" Association="Self.FK__Distribut__Id_em__39237A9A">
  303. <End Role="Employees" EntitySet="Employees" />
  304. <End Role="Distributions" EntitySet="Distributions" />
  305. </AssociationSet>
  306. <AssociationSet Name="FK__Distribut__Id_gr__3A179ED3" Association="Self.FK__Distribut__Id_gr__3A179ED3">
  307. <End Role="Groups" EntitySet="Groups" />
  308. <End Role="Distributions" EntitySet="Distributions" />
  309. </AssociationSet>
  310. <AssociationSet Name="FK__Employees__Id_ge__1E6F845E" Association="Self.FK__Employees__Id_ge__1E6F845E">
  311. <End Role="Genders" EntitySet="Genders" />
  312. <End Role="Employees" EntitySet="Employees" />
  313. </AssociationSet>
  314. <AssociationSet Name="FK__Employees__Id_po__1F63A897" Association="Self.FK__Employees__Id_po__1F63A897">
  315. <End Role="Positions" EntitySet="Positions" />
  316. <End Role="Employees" EntitySet="Employees" />
  317. </AssociationSet>
  318. <AssociationSet Name="FK__Employees__Id_ro__2057CCD0" Association="Self.FK__Employees__Id_ro__2057CCD0">
  319. <End Role="Roles" EntitySet="Roles" />
  320. <End Role="Employees" EntitySet="Employees" />
  321. </AssociationSet>
  322. <AssociationSet Name="FK__Groups__Id_type__4E53A1AA" Association="Self.FK__Groups__Id_type__4E53A1AA">
  323. <End Role="Types_group" EntitySet="Types_group" />
  324. <End Role="Groups" EntitySet="Groups" />
  325. </AssociationSet>
  326. <AssociationSet Name="FK__Kinships__Id_chi__70A8B9AE" Association="Self.FK__Kinships__Id_chi__70A8B9AE">
  327. <End Role="Children" EntitySet="Children" />
  328. <End Role="Kinships" EntitySet="Kinships" />
  329. </AssociationSet>
  330. <AssociationSet Name="FK__Kinships__Id_par__6FB49575" Association="Self.FK__Kinships__Id_par__6FB49575">
  331. <End Role="Parents" EntitySet="Parents" />
  332. <End Role="Kinships" EntitySet="Kinships" />
  333. </AssociationSet>
  334. <AssociationSet Name="FK__Parents__Id_gend__6CD828CA" Association="Self.FK__Parents__Id_gend__6CD828CA">
  335. <End Role="Genders" EntitySet="Genders" />
  336. <End Role="Parents" EntitySet="Parents" />
  337. </AssociationSet>
  338. <AssociationSet Name="FK_Sertificates_Children" Association="Self.FK_Sertificates_Children">
  339. <End Role="Children" EntitySet="Children" />
  340. <End Role="Sertificates" EntitySet="Sertificates" />
  341. </AssociationSet>
  342. </EntityContainer>
  343. </Schema>