Advertisement
Guest User

Untitled

a guest
Jun 7th, 2017
521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.19 KB | None | 0 0
  1.  
  2. /****** Object: Table [dbo].[DefaultSchedule] Script Date: 07.06.2017 23:20:08 ******/
  3. SET ANSI_NULLS ON
  4. GO
  5. SET QUOTED_IDENTIFIER ON
  6. GO
  7. CREATE TABLE [dbo].[DefaultSchedule](
  8. [ScheduleId] [int] NOT NULL,
  9. [SubjectId] [int] NOT NULL,
  10. [GroupId] [int] NOT NULL,
  11. [DayOfWeek] [int] NOT NULL,
  12. [LecturerId] [int] NOT NULL,
  13. [PairNumber] [int] NOT NULL,
  14. [Denominator] [int] NULL,
  15. CONSTRAINT [PK_DefaultSchedule] PRIMARY KEY CLUSTERED
  16. (
  17. [ScheduleId] ASC
  18. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  19. ) ON [PRIMARY]
  20.  
  21. GO
  22. /****** Object: Table [dbo].[Groups] Script Date: 07.06.2017 23:20:08 ******/
  23. SET ANSI_NULLS ON
  24. GO
  25. SET QUOTED_IDENTIFIER ON
  26. GO
  27. CREATE TABLE [dbo].[Groups](
  28. [Id] [int] NOT NULL,
  29. [GroupKey] [nvarchar](50) NOT NULL,
  30. [SpecialityId] [int] NOT NULL,
  31. [Course] [int] NOT NULL,
  32. CONSTRAINT [PK_Groups] PRIMARY KEY CLUSTERED
  33. (
  34. [Id] ASC
  35. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  36. ) ON [PRIMARY]
  37.  
  38. GO
  39. /****** Object: Table [dbo].[Lecturers] Script Date: 07.06.2017 23:20:08 ******/
  40. SET ANSI_NULLS ON
  41. GO
  42. SET QUOTED_IDENTIFIER ON
  43. GO
  44. CREATE TABLE [dbo].[Lecturers](
  45. [Id] [int] NOT NULL,
  46. [Surname] [nvarchar](50) NOT NULL,
  47. [Name] [nvarchar](50) NOT NULL,
  48. [Patronymic] [nvarchar](50) NOT NULL,
  49. CONSTRAINT [PK_Lecturers] PRIMARY KEY CLUSTERED
  50. (
  51. [Id] ASC
  52. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  53. ) ON [PRIMARY]
  54.  
  55. GO
  56. /****** Object: Table [dbo].[LecturersSubjects] Script Date: 07.06.2017 23:20:08 ******/
  57. SET ANSI_NULLS ON
  58. GO
  59. SET QUOTED_IDENTIFIER ON
  60. GO
  61. CREATE TABLE [dbo].[LecturersSubjects](
  62. [LecturerId] [int] NOT NULL,
  63. [SubjectId] [int] NOT NULL,
  64. CONSTRAINT [PK_LecturersSubjects] PRIMARY KEY CLUSTERED
  65. (
  66. [LecturerId] ASC,
  67. [SubjectId] ASC
  68. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  69. ) ON [PRIMARY]
  70.  
  71. GO
  72. /****** Object: Table [dbo].[PairsTime] Script Date: 07.06.2017 23:20:08 ******/
  73. SET ANSI_NULLS ON
  74. GO
  75. SET QUOTED_IDENTIFIER ON
  76. GO
  77. CREATE TABLE [dbo].[PairsTime](
  78. [Number] [int] NOT NULL,
  79. [StartTime] [time](7) NOT NULL,
  80. [EndTime] [time](7) NOT NULL,
  81. CONSTRAINT [PK_PairsTime] PRIMARY KEY CLUSTERED
  82. (
  83. [Number] ASC
  84. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  85. ) ON [PRIMARY]
  86.  
  87. GO
  88. /****** Object: Table [dbo].[Praepostors] Script Date: 07.06.2017 23:20:08 ******/
  89. SET ANSI_NULLS ON
  90. GO
  91. SET QUOTED_IDENTIFIER ON
  92. GO
  93. CREATE TABLE [dbo].[Praepostors](
  94. [Id] [int] NOT NULL,
  95. [StudentId] [int] NOT NULL,
  96. [GroupId] [int] NOT NULL,
  97. CONSTRAINT [PK_Praepostors] PRIMARY KEY CLUSTERED
  98. (
  99. [Id] ASC
  100. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  101. ) ON [PRIMARY]
  102.  
  103. GO
  104. /****** Object: Table [dbo].[Specialities] Script Date: 07.06.2017 23:20:08 ******/
  105. SET ANSI_NULLS ON
  106. GO
  107. SET QUOTED_IDENTIFIER ON
  108. GO
  109. CREATE TABLE [dbo].[Specialities](
  110. [Id] [int] NOT NULL,
  111. [Name] [nvarchar](50) NOT NULL,
  112. CONSTRAINT [PK_Specialities] PRIMARY KEY CLUSTERED
  113. (
  114. [Id] ASC
  115. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  116. ) ON [PRIMARY]
  117.  
  118. GO
  119. /****** Object: Table [dbo].[Students] Script Date: 07.06.2017 23:20:08 ******/
  120. SET ANSI_NULLS ON
  121. GO
  122. SET QUOTED_IDENTIFIER ON
  123. GO
  124. CREATE TABLE [dbo].[Students](
  125. [Id] [int] NOT NULL,
  126. [Surname] [nvarchar](50) NOT NULL,
  127. [Name] [nvarchar](50) NOT NULL,
  128. [Patronymic] [nvarchar](50) NOT NULL,
  129. [GroupId] [int] NOT NULL,
  130. [Email] [nvarchar](50) NULL,
  131. [StudentNumber] [nvarchar](50) NOT NULL,
  132. CONSTRAINT [PK_Students] PRIMARY KEY CLUSTERED
  133. (
  134. [Id] ASC
  135. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  136. ) ON [PRIMARY]
  137.  
  138. GO
  139. /****** Object: Table [dbo].[Subjects] Script Date: 07.06.2017 23:20:08 ******/
  140. SET ANSI_NULLS ON
  141. GO
  142. SET QUOTED_IDENTIFIER ON
  143. GO
  144. CREATE TABLE [dbo].[Subjects](
  145. [Id] [int] NOT NULL,
  146. [Subject] [nvarchar](50) NOT NULL,
  147. CONSTRAINT [PK_Subjects] PRIMARY KEY CLUSTERED
  148. (
  149. [Id] ASC
  150. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  151. ) ON [PRIMARY]
  152.  
  153. GO
  154. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (1, 3, 1, 1, 4, 2, NULL)
  155. GO
  156. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (3, 3, 1, 1, 5, 3, 1)
  157. GO
  158. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (4, 1, 1, 2, 1, 1, NULL)
  159. GO
  160. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (5, 4, 1, 2, 6, 2, NULL)
  161. GO
  162. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (6, 1, 1, 2, 1, 3, NULL)
  163. GO
  164. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (7, 5, 1, 3, 3, 1, NULL)
  165. GO
  166. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (8, 6, 1, 3, 7, 2, NULL)
  167. GO
  168. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (9, 2, 1, 4, 2, 4, NULL)
  169. GO
  170. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (10, 8, 1, 4, 2, 3, NULL)
  171. GO
  172. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (11, 7, 1, 4, 8, 2, NULL)
  173. GO
  174. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (12, 5, 1, 5, 3, 1, 1)
  175. GO
  176. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (13, 2, 1, 5, 2, 2, NULL)
  177. GO
  178. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (14, 5, 2, 1, 3, 1, 0)
  179. GO
  180. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (15, 3, 1, 1, 4, 3, 0)
  181. GO
  182. INSERT [dbo].[DefaultSchedule] ([ScheduleId], [SubjectId], [GroupId], [DayOfWeek], [LecturerId], [PairNumber], [Denominator]) VALUES (16, 4, 1, 1, 6, 1, 0)
  183. GO
  184. INSERT [dbo].[Groups] ([Id], [GroupKey], [SpecialityId], [Course]) VALUES (1, N'КБ-41-СО', 1, 4)
  185. GO
  186. INSERT [dbo].[Groups] ([Id], [GroupKey], [SpecialityId], [Course]) VALUES (2, N'КБ-51-СО', 1, 5)
  187. GO
  188. INSERT [dbo].[Groups] ([Id], [GroupKey], [SpecialityId], [Course]) VALUES (3, N'КБ-31-НЕСО', 2, 3)
  189. GO
  190. INSERT [dbo].[Groups] ([Id], [GroupKey], [SpecialityId], [Course]) VALUES (4, N'КБ-31-СО', 1, 3)
  191. GO
  192. INSERT [dbo].[Lecturers] ([Id], [Surname], [Name], [Patronymic]) VALUES (1, N'Якимова', N'Ольга', N'Павловна')
  193. GO
  194. INSERT [dbo].[Lecturers] ([Id], [Surname], [Name], [Patronymic]) VALUES (2, N'Дурнев', N'Валерий', N'Георгиевич')
  195. GO
  196. INSERT [dbo].[Lecturers] ([Id], [Surname], [Name], [Patronymic]) VALUES (3, N'Яблокова', N'Светлана', N'Ивановна')
  197. GO
  198. INSERT [dbo].[Lecturers] ([Id], [Surname], [Name], [Patronymic]) VALUES (4, N'Иванова', N'Наталья', N'Александровна')
  199. GO
  200. INSERT [dbo].[Lecturers] ([Id], [Surname], [Name], [Patronymic]) VALUES (5, N'Власова', N'Ольга', N'Владимировна')
  201. GO
  202. INSERT [dbo].[Lecturers] ([Id], [Surname], [Name], [Patronymic]) VALUES (6, N'Иванова', N'Имя', N'Отчество')
  203. GO
  204. INSERT [dbo].[Lecturers] ([Id], [Surname], [Name], [Patronymic]) VALUES (7, N'Иванов', N'Имя', N'Отчество')
  205. GO
  206. INSERT [dbo].[Lecturers] ([Id], [Surname], [Name], [Patronymic]) VALUES (8, N'Мурин', N'Дмитрий', N'Михайлович')
  207. GO
  208. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (1, 1)
  209. GO
  210. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (2, 2)
  211. GO
  212. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (2, 4)
  213. GO
  214. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (2, 8)
  215. GO
  216. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (3, 4)
  217. GO
  218. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (3, 5)
  219. GO
  220. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (4, 3)
  221. GO
  222. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (4, 4)
  223. GO
  224. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (5, 2)
  225. GO
  226. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (5, 3)
  227. GO
  228. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (6, 2)
  229. GO
  230. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (6, 3)
  231. GO
  232. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (6, 4)
  233. GO
  234. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (7, 3)
  235. GO
  236. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (7, 4)
  237. GO
  238. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (7, 6)
  239. GO
  240. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (8, 4)
  241. GO
  242. INSERT [dbo].[LecturersSubjects] ([LecturerId], [SubjectId]) VALUES (8, 7)
  243. GO
  244. INSERT [dbo].[PairsTime] ([Number], [StartTime], [EndTime]) VALUES (1, CAST(N'09:00:00' AS Time), CAST(N'10:35:00' AS Time))
  245. GO
  246. INSERT [dbo].[PairsTime] ([Number], [StartTime], [EndTime]) VALUES (2, CAST(N'10:45:00' AS Time), CAST(N'12:20:00' AS Time))
  247. GO
  248. INSERT [dbo].[PairsTime] ([Number], [StartTime], [EndTime]) VALUES (3, CAST(N'12:30:00' AS Time), CAST(N'14:05:00' AS Time))
  249. GO
  250. INSERT [dbo].[PairsTime] ([Number], [StartTime], [EndTime]) VALUES (4, CAST(N'14:15:00' AS Time), CAST(N'15:50:00' AS Time))
  251. GO
  252. INSERT [dbo].[PairsTime] ([Number], [StartTime], [EndTime]) VALUES (5, CAST(N'16:00:00' AS Time), CAST(N'17:30:00' AS Time))
  253. GO
  254. INSERT [dbo].[Praepostors] ([Id], [StudentId], [GroupId]) VALUES (1, 4, 1)
  255. GO
  256. INSERT [dbo].[Specialities] ([Id], [Name]) VALUES (1, N'Компьютерная безопасность')
  257. GO
  258. INSERT [dbo].[Specialities] ([Id], [Name]) VALUES (2, N'Специальность Мяу')
  259. GO
  260. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (1, N'Карачев', N'Дмитрий', N'Александрович', 1, N'karachevdmk@gmail.com', N'1010116')
  261. GO
  262. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (2, N'Из', N'Кто-то', N'КБ51ане из кб 41 опять из кб 51', 2, N'withEmail@mail.ru', N'1010117')
  263. GO
  264. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (3, N'Бекташи', N'Руслан', N'Валерьевич', 1, NULL, N'1010118')
  265. GO
  266. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (4, N'Мищенко', N'Наталья', N'Извини', 1, NULL, N'1010119')
  267. GO
  268. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (10, N'Пасхина', N'Полина', N'Лалаа', 1, N'pash@mail.ru', N'1010125')
  269. GO
  270. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (11, N'Дюдюкин', N'Павел', N'Привет', 1, N'pasha@mail.ru', N'1010126')
  271. GO
  272. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (12, N'Белов', N'Александр', N'Да', 1, NULL, N'1010127')
  273. GO
  274. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (14, N'Смолина', N'Анастасия', N'Извини', 1, NULL, N'1010120')
  275. GO
  276. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (16, N'Привет', N'А я', N'Из КБ51', 2, N'ЛАЛАЛА@Meow.ru', N'1010130')
  277. GO
  278. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (17, N'Карачев', N'Дмитрий', N'Из Будующего =))))))0', 2, N'НесуществуюшийЭмэйл', N'101010101010')
  279. GO
  280. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (18, N'МЯу', N'Дмитрий', N'Мур', 1, NULL, N'123')
  281. GO
  282. INSERT [dbo].[Students] ([Id], [Surname], [Name], [Patronymic], [GroupId], [Email], [StudentNumber]) VALUES (19, N'Елаев', N'Иван', N'Иванович', 4, N'dmdmd@mddm.ru', N'10101023')
  283. GO
  284. INSERT [dbo].[Subjects] ([Id], [Subject]) VALUES (1, N'ASP.NET')
  285. GO
  286. INSERT [dbo].[Subjects] ([Id], [Subject]) VALUES (2, N'КМЗИ')
  287. GO
  288. INSERT [dbo].[Subjects] ([Id], [Subject]) VALUES (3, N'СУБД')
  289. GO
  290. INSERT [dbo].[Subjects] ([Id], [Subject]) VALUES (4, N'Алгебра')
  291. GO
  292. INSERT [dbo].[Subjects] ([Id], [Subject]) VALUES (5, N'Алгоритмика')
  293. GO
  294. INSERT [dbo].[Subjects] ([Id], [Subject]) VALUES (6, N'Безопасность')
  295. GO
  296. INSERT [dbo].[Subjects] ([Id], [Subject]) VALUES (7, N'Предмет Мурина')
  297. GO
  298. INSERT [dbo].[Subjects] ([Id], [Subject]) VALUES (8, N'Второй предмет Дурнева')
  299. GO
  300. ALTER TABLE [dbo].[DefaultSchedule] WITH CHECK ADD CONSTRAINT [FK_DefaultSchedule_Groups] FOREIGN KEY([GroupId])
  301. REFERENCES [dbo].[Groups] ([Id])
  302. GO
  303. ALTER TABLE [dbo].[DefaultSchedule] CHECK CONSTRAINT [FK_DefaultSchedule_Groups]
  304. GO
  305. ALTER TABLE [dbo].[DefaultSchedule] WITH CHECK ADD CONSTRAINT [FK_DefaultSchedule_Lecturers] FOREIGN KEY([LecturerId])
  306. REFERENCES [dbo].[Lecturers] ([Id])
  307. GO
  308. ALTER TABLE [dbo].[DefaultSchedule] CHECK CONSTRAINT [FK_DefaultSchedule_Lecturers]
  309. GO
  310. ALTER TABLE [dbo].[DefaultSchedule] WITH CHECK ADD CONSTRAINT [FK_DefaultSchedule_PairsTime] FOREIGN KEY([PairNumber])
  311. REFERENCES [dbo].[PairsTime] ([Number])
  312. GO
  313. ALTER TABLE [dbo].[DefaultSchedule] CHECK CONSTRAINT [FK_DefaultSchedule_PairsTime]
  314. GO
  315. ALTER TABLE [dbo].[DefaultSchedule] WITH CHECK ADD CONSTRAINT [FK_DefaultSchedule_Subjects] FOREIGN KEY([SubjectId])
  316. REFERENCES [dbo].[Subjects] ([Id])
  317. GO
  318. ALTER TABLE [dbo].[DefaultSchedule] CHECK CONSTRAINT [FK_DefaultSchedule_Subjects]
  319. GO
  320. ALTER TABLE [dbo].[Groups] WITH CHECK ADD CONSTRAINT [FK_Groups_Specialities] FOREIGN KEY([SpecialityId])
  321. REFERENCES [dbo].[Specialities] ([Id])
  322. GO
  323. ALTER TABLE [dbo].[Groups] CHECK CONSTRAINT [FK_Groups_Specialities]
  324. GO
  325. ALTER TABLE [dbo].[LecturersSubjects] WITH CHECK ADD CONSTRAINT [FK_LecturersSubjects_Lecturers] FOREIGN KEY([LecturerId])
  326. REFERENCES [dbo].[Lecturers] ([Id])
  327. GO
  328. ALTER TABLE [dbo].[LecturersSubjects] CHECK CONSTRAINT [FK_LecturersSubjects_Lecturers]
  329. GO
  330. ALTER TABLE [dbo].[LecturersSubjects] WITH CHECK ADD CONSTRAINT [FK_LecturersSubjects_Subjects] FOREIGN KEY([SubjectId])
  331. REFERENCES [dbo].[Subjects] ([Id])
  332. GO
  333. ALTER TABLE [dbo].[LecturersSubjects] CHECK CONSTRAINT [FK_LecturersSubjects_Subjects]
  334. GO
  335. ALTER TABLE [dbo].[Praepostors] WITH CHECK ADD CONSTRAINT [FK_Praepostors_Groups] FOREIGN KEY([GroupId])
  336. REFERENCES [dbo].[Groups] ([Id])
  337. GO
  338. ALTER TABLE [dbo].[Praepostors] CHECK CONSTRAINT [FK_Praepostors_Groups]
  339. GO
  340. ALTER TABLE [dbo].[Praepostors] WITH CHECK ADD CONSTRAINT [FK_Praepostors_Students] FOREIGN KEY([StudentId])
  341. REFERENCES [dbo].[Students] ([Id])
  342. GO
  343. ALTER TABLE [dbo].[Praepostors] CHECK CONSTRAINT [FK_Praepostors_Students]
  344. GO
  345. ALTER TABLE [dbo].[Students] WITH CHECK ADD CONSTRAINT [FK_Students_Groups] FOREIGN KEY([GroupId])
  346. REFERENCES [dbo].[Groups] ([Id])
  347. GO
  348. ALTER TABLE [dbo].[Students] CHECK CONSTRAINT [FK_Students_Groups]
  349. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement