WikiStart/RelationalDesign: polnenje_old1.sql

File polnenje_old1.sql, 10.4 KB (added by 121232, 10 months ago)
Line 
1-- Внесување test data во табелата 'student'
2INSERT INTO project.student (student_id, username, s_first_name, s_last_name, s_password)
3VALUES
4 (91324, 'SaraS', 'Sara', 'Stojilkova', 'password123'),
5 (13467, 'MagiStoj', 'Margarita', 'Stojkovska', 'securepass'),
6 (98727, 'IlinkaS', 'Ilinka', 'Stavrova', 'secret789');
7
8-- Внесување test data во табелата 'subject_book'
9INSERT INTO project.subject_book (book_id, book_title, b_year_of_publishment, book_edition)
10VALUES
11 (245, 'Mathematics Textbook', 2020, '2nd Edition'),
12 (10, 'History of Software', 2019, '1st Edition'),
13 (89, 'Algebra for Beginners', 2010, '1st Edition');
14
15-- Внесување test data во табелата 'chapter'
16INSERT INTO project.chapter (book_id, chapter_number, chapter_title)
17VALUES
18 (245, 1, 'Introduction'),
19 (10, 2, 'Fundamentals'),
20 (89, 1, 'Introduction to Algebra');
21
22
23-- Внесување test data во табелата 'author'
24INSERT INTO project.author (author_id, author_name, a_short_biography)
25VALUES
26 (1, 'John Matheson', 'Renowned mathematician and author.'),
27 (2, 'Alice Historian', 'Specialized in ancient history.'),
28 (3, 'Vangel Ajanovski', 'Profesor na FINKI.');
29
30-- Внесување test data во табелата 'feedback'
31INSERT INTO project.feedback (fb_id, fb_date, fb_title, fb_description, fb_rating)
32VALUES
33 (1, '2024-01-23', 'Great', 'Odlicna aplikacija kolegi. Mn lesna za koristenje', 5),
34 (2, '2024-01-24', 'OK', 'Bi sakal da ima pomoderen dizajn', 3),
35 (45, '2022-05-21', 'Super', 'Sekojdnevno ja koristam aplikacijata, super e!', 5);
36
37-- Внесување test data во табелата 'e_mail'
38INSERT INTO project.e_mail (student_id, e_mail_id, e_mail_address)
39VALUES
40 (91324, 28, 'sara.stojilkova@gmail.com'),
41 (13467, 45, 'margarita.stojkovska@hotmail.com'),
42 (98727, 789, 'ilinka.stavrova@students.com');
43
44-- Внесување test data во табелата 'school_year'
45INSERT INTO project.school_year (student_id, starting_year, finishing_year)
46VALUES
47 (91324, 2023, 2024),
48 (13467, 2023, 2024),
49 (98727, 2023, 2024);
50
51-- Внесување test data во табелата 'term'
52INSERT INTO project.term (student_id, starting_year, finishing_year, term_type, term_start_date, term_end_date)
53VALUES
54 (91324, 2023, 2024, 'Zimski', '2023-09-01', '2024-01-20'),
55 (13467, 2023, 2024, 'Zimski', '2022-01-15', '2023-01-20'),
56 (98727, 2023, 2024, 'Leten', '2024-02-01', '2024-06-20');
57
58 -- Внесување test data во табелата 'calendar_event'
59INSERT INTO project.calendar_event (calendar_event_id, event_name , event_type , event_description, event_start_time, event_end_time)
60VALUES
61 (16578, 'Predavanje Bazi', 'Predavanje', 'Introduction to SQL', '16:33', '18:00'),
62 (26543, 'Predavanje Kalkulus', 'Predavanje', 'Funkcii', '13:00', '14:00'),
63 (98352, 'Vezbi Bazi', 'Vezbi', 'Izrabotka na ER dijagram', '18:00', '18:45');
64
65-- Внесување test data во табелата 'reminder'
66INSERT INTO project.reminder (calendar_event_id, r_id, minutes_before_event, r_flag)
67VALUES
68 (16578, 134, 30, true),
69 (26543, 769, 15, true),
70 (98352, 249, 15, true);
71
72-- Внесување test data во табелата 'place'
73INSERT INTO project.place (place_id, building_name, room_name)
74VALUES
75 (1, 'FINKI Podrum', 'Lab 301'),
76 (9, 'Dekanat', 'Soba 10'),
77 (12, 'FEIT', 'Lab 102');
78
79-- Внесување test data во табелата 'dashboard'
80INSERT INTO project.dashboard (student_id, dashboard_id, dashboard_date)
81VALUES
82 (91324, 14, '2023-01-22'),
83 (13467, 26, '2023-07-19'),
84 (13467, 27, '2023-08-20');
85
86-- Внесување test data во табелата 'notes'
87INSERT INTO project.notes (student_id, dashboard_id, note_id, notes_date, note_text)
88VALUES
89 (91324, 14, 13, '2023-01-22', 'Ne zaboravaj da zemes potvrda od studentski prasanja.'),
90 (13467, 26, 2, '2023-07-19', 'Zapisi semestar.'),
91 (13467, 27, 27, '2023-08-20', 'Prijavi se na anketa za ispit Bazi.');
92
93-- Внесување test data во табелата 'professor'
94INSERT INTO project.professor (professor_id, p_first_name, p_last_name, p_role, p_email)
95VALUES
96 (1, 'Vangel', 'Ajanovski', 'Profesor', 'vangel.ajanovski@profesor.com'),
97 (24, 'Sara', 'Milevska', 'Asistent', 'sara.milevska@efinki.com'),
98 (34, 'Smile', 'Smilevski', 'Profesor', 'smiles@finki.com');
99
100 -- Внесување test data во табелата 'subject_at_term'
101INSERT INTO project.subject_at_term (student_id, starting_year, finishing_year, term_type, term_subject_id, subject_name)
102VALUES
103 (91324, 2023, 2024, 'Zimski', 56, 'Napredno programiranje'),
104 (13467, 2023, 2024, 'Zimski', 23, 'Bazi na podatoci'),
105 (98727, 2023, 2024, 'Leten', 67, 'Internet Tehnologii');
106
107-- Внесување test data во табелата 'has_taken_a_subject'
108INSERT INTO project.has_taken_a_subject (student_id, starting_year, finishing_year, term_type, term_subject_id, student_id_ref)
109VALUES
110 (91324, 2023, 2024, 'Zimski', 56, 91324),
111 (13467, 2023, 2024, 'Zimski', 23, 13467),
112 (98727, 2023, 2024, 'Leten', 67, 98727);
113
114-- Внесување test data во табелата 'holds_subject'
115INSERT INTO project.holds_subject (student_id, starting_year, finishing_year, term_type, term_subject_id, professor_id)
116VALUES
117 (91324, 2023, 2024, 'Zimski', 56, 34),
118 (13467, 2023, 2024, 'Zimski', 23, 1),
119 (98727, 2023, 2024, 'Leten', 67, 24);
120
121-- Внесување test data во табелата 'task'
122INSERT INTO project.task (task_id, task_name, task_description, task_priority)
123VALUES
124 (11111, 'dbLearn zadaci', 'Resavanje na serija od dbLearn', 2),
125 (22222, 'Proekt', 'Dorabotka na faza 2 od proekt po bazi na podatoci', 1),
126 (33333, 'Podgotovka za vtor kolokvium','Resavanje na auditoriski vezbi 6-11', 1);
127
128 -- Внесување test data во табелата 'creates_task'
129INSERT INTO project.creates_task (task_id, student_id, starting_year, finishing_year, term_type, term_subject_id)
130VALUES
131 (11111, 13467, 2023, 2024, 'Zimski', 23),
132 (22222, 13467, 2023, 2024, 'Zimski', 23),
133 (33333, 98727, 2023, 2024, 'Leten', 67);
134
135 -- Внесување test data во табелата 'task - 1'
136INSERT INTO project.task (task_id, task_name, task_description, task_priority)
137VALUES
138 (44444, 'Generalka', '', 3);
139
140 -- Внесување test data во табелата 'student_task'
141INSERT INTO project.student_task (task_id, student_id)
142VALUES
143 (44444, 98727);
144
145 -- Внесување test data во табелата 'book_author'
146INSERT INTO project.book_author (author_id, book_id)
147VALUES
148 (1, 245),
149 (2, 10),
150 (3, 89);
151
152 -- Внесување test data во табелата 'happens_at_place'
153INSERT INTO project.happens_at_place (calendar_event_id, place_id)
154VALUES
155 (16578, 1),
156 (26543, 9),
157 (98352, 12);
158
159 -- Внесување test data во табелата 'recommended_chapter'
160INSERT INTO project.recommended_chapter (calendar_event_id, book_id, chapter_number)
161VALUES
162 (16578, 245, 1),
163 (26543, 245, 1),
164 (26543, 89, 1),
165 (98352, 89, 1);
166
167 -- Внесување test data во табелата 'calendar_event - 2'
168INSERT INTO project.calendar_event (calendar_event_id, event_name , event_type , event_description, event_start_time, event_end_time)
169VALUES
170 (66666, 'Konsultacii bazi', 'Konsultacii', 'Odbrana na faza 2', '16:00', '18:00');
171
172 -- Внесување test data во табелата 'has_consultations'
173INSERT INTO project.has_consultations (calendar_event_id, professor_id)
174VALUES
175 (66666, 1);
176
177 -- Внесување test data во табелата 'subject_event'
178INSERT INTO project.subject_event (calendar_event_id, student_id, starting_year, finishing_year, term_type, term_subject_id)
179VALUES
180 (16578, 13467, 2023, 2024, 'Zimski', 23),
181 (26543, 91324, 2023, 2024, 'Zimski', 56),
182 (98352, 13467, 2023, 2024, 'Zimski', 23);
183
184-- Внесување test data во табелта 'holds_event'
185INSERT INTO project.holds_event (calendar_event_id, professor_id)
186VALUES
187 (16578, 1),
188 (26543, 24),
189 (98352, 34);
190
191-- Внесување test data во табелата 'dashboard_task'
192INSERT INTO dashboard_task (task_id, student_id, dashboard_id)
193VALUES
194 (11111, 91324, 14),
195 (22222, 13467, 26),
196 (33333, 13467, 27);
197
198-- Внесување test data во табелата 'gives_feedback'
199INSERT INTO gives_feedback (fb_id, student_id)
200VALUES
201 (1, 13467),
202 (2, 91324),
203 (45, 91324);
204
205-- Внесување test data во табелата 'recommended_book'
206INSERT INTO recommended_book (student_id, starting_year, finishing_year, term_type, term_subject_id, book_id)
207VALUES
208 (91324, 2023, 2024, 'Zimski', 56, 245),
209 (91324, 2023, 2024, 'Zimski', 56, 10),
210 (13467, 2023, 2024, 'Zimski', 23, 89);
211
212-- Внесување test data во табелата 'dashboard_event'
213INSERT INTO dashboard_event (calendar_event_id, student_id, dashboard_id)
214VALUES
215 (66666, 91324, 14),
216 (16578, 13467, 26),
217 (98352, 13467, 26);
218
219-- Внесување test data во табелата 'year_has_subject'
220INSERT INTO year_has_subject (student_id, starting_year, finishing_year, term_type, term_subject_id, student_id_ref, starting_year_ref, finishing_year_ref)
221VALUES
222 (91324, 2023, 2024, 'Zimski', 56, 91324, 2023, 2024),
223 (13467, 2023, 2024, 'Zimski', 23, 13467, 2023, 2024),
224 (98727, 2023, 2024, 'Leten', 67, 98727, 2023, 2024);
225
226-- Внесување test data во табелата 'calendar_event - 3'
227INSERT INTO project.calendar_event (calendar_event_id, event_name , event_type, event_start_time, event_end_time)
228VALUES
229 (88888, 'Rabotilnica za pretpriemnistvo', 'Rabotilnica', '14:00', '16:00');
230
231-- Внесување test data во табелата 'student_event'
232INSERT INTO student_event (calendar_event_id, student_id)
233VALUES
234 (88888, 91324);
235
236-- Внесување test data во табелата 'repeating_event'
237INSERT INTO repeating_event (calendar_event_id, event_week_day, repeats_every_n_weeks, starting_date, ending_date)
238VALUES
239 (16578, 'Wednesday', 1, '2023-10-10', '2024-01-07'),
240 (26543, 'Tuesday', 1, '2023-11-02', '2024-01-09'),
241 (98352, 'Thursday', 3, '2023-11-15', '2024-02-15');
242
243-- Внесување test data во табелата 'non_repeating_event'
244INSERT INTO non_repeating_event (calendar_event_id, event_date)
245VALUES
246 (88888, '2024-02-07'),
247 (66666, '2024-01-23');