create table Status statusID INTEGER PRIMARY KEY status text create ta

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
create table Status (statusID INTEGER PRIMARY KEY, status text);
create table Nationality (nationID INTEGER PRIMARY KEY, nationality text);
create table Room (roomID INTEGER PRIMARY KEY, corpusID INTEGER, numberAP INTEGER);
create table Corpus (corpusID INTEGER PRIMARY KEY, adress text, numberAR INTEGER);
create table City (cityID INTEGER PRIMARY KEY, city text);
create table Student (studentID INTEGER PRIMARY KEY, roomID INTEGER, statusID INTEGER, nationID INTEGER, cityID INTEGER, course INTEGER, groupp INTEGER, passport INTEGER, birthDate text, visa INTEGER, expDate text, name text);
insert into Status values(1, 'учится');
insert into Status values(2, 'отчислен');
insert into Status values(3, 'академический отпуск');
insert into Status values(4, 'выпускник');
insert into City values(2, 'Иваново');
insert into City values(3, 'Москва');
insert into City values(4, 'Гомель');
insert into City values(5, 'Париж');
insert into City values(6, 'Кострома');
insert into City values(7, 'Шуя');
insert into City values(8, 'Чебоксары');
insert into City values(9, 'Стамбул');
insert into Corpus values(4, 'г. Иваново, Комсомольская 4', 400);
insert into Corpus values(2, 'г. Иваново, Комсомольская 2', 400);
insert into Corpus values(3, 'г. Иваново, Комсомольская 3', 400);
insert into Corpus values(4, 'г. Иваново, Комсомольская 4', 400);
insert into Nationality values(1, 'Франция');
insert into Nationality values(2, 'Турция');
insert into Nationality values(3, 'Украина');
insert into Room values(11, 4, 4);
insert into Room values(12, 4, 4);
insert into Room values(13, 4, 4);
insert into Room values(14, 4, 3);
insert into Room values(15, 4, 2);
insert into Room values(21, 2, 4);
insert into Room values(22, 2, 4);
insert into Room values(23, 2, 4);
insert into Room values(24, 2, 3);
insert into Room values(25, 2, 2);
insert into Room values(31, 3, 4);
insert into Room values(32, 3, 4);
insert into Room values(33, 3, 4);
insert into Room values(34, 3, 3);
insert into Room values(35, 3, 2);
insert into Room values(41, 4, 4);
insert into Room values(42, 4, 4);
insert into Room values(43, 4, 4);
insert into Room values(44, 4, 3);
insert into Room values(45, 4, 2);
insert into Student values(1, 11, 1, 1, 5, 1, 11, 12345670, '1994-08-26', 1324, '2014-08-26', 'Jorj');
insert into Student values(2, 12, 1, 1, 5, 1, 12, 12345671, '1993-08-26', 1323, '2014-08-25', 'Jakob');
insert into Student values(3, 12, 1, 2, 9, 2, 12, 12345672, '1992-07-26', 1323, '2014-08-25', 'Jakob');
insert into Student values(4, 14, 1, 3, 4, 4, 13, 12345673, '1991-06-26', 1323, '2014-08-25', 'Jakob');
insert into Student values(5, 21, 2, NULL, 7, 1, 21, 12345674, '1994-08-12', NULL, NULL, 'Maksim');
insert into Student values(6, 21, 1, NULL, 7, 1, 21, 12345675, '1994-08-15', NULL, NULL, 'Masha');
insert into Student values(7, 22, 3, NULL, 6, 2, 23, 12345676, '1994-09-23', NULL, NULL, 'Denis');
insert into Student values(8, 23,1, NULL, 7, 2, 23, 12345677, '1992-01-31', NULL, NULL, 'Adrey');
insert into Student values(9, 31, 1, NULL, 8, 4, 44, 12345678, '1991-03-01', NULL, NULL, 'Stas');
insert into Student values(10, 31, 4, NULL, 3, 4, 44, 12345679, '1994-08-03', NULL, NULL, 'Vova');
insert into Student values(11, 32,1, NULL, 3, 4, 44, 12345669, '1994-08-26', NULL, NULL, 'Nadya');
insert into Student values(12, 33, 1, NULL, 6, 3, 41, 12345668, '1994-08-25', NULL, NULL, 'Roma');
insert into Student values(13, 41, 1, NULL, 7, 3, 32, 12345667, '1994-08-23', NULL, NULL, 'Sasha');
insert into Student values(14, 42, 1, NULL, 7, 3, 32, 12345666, '1994-08-26', NULL, NULL, 'Lida');
insert into Student values(15, 42, 1, NULL, 8, 2, 31, 12345665, '1994-08-26', NULL, NULL, 'Lola');