1 | insert into administratori(a_ime, a_prezime, a_korisnicko_ime, a_email, a_lozinka)
|
---|
2 | values
|
---|
3 | ('Lina', 'Nakova', 'admin1', 'lina.nakova@admin.com', 'admin'),
|
---|
4 | ('Angel', 'Nasev', 'admin2', 'angel.nasev@admin.com', 'admin'),
|
---|
5 | ('Katerina', 'Smileska', 'admin3', 'katerina.smileska@admin.com', 'admin');
|
---|
6 |
|
---|
7 | insert into studenti(s_ime, s_prezime, s_korisnicko_ime, s_email, s_lozinka, s_index)
|
---|
8 | values
|
---|
9 | ('Lina', 'Nakova', 'lina.nakova', 'lina.nakova@students.finki.ukim.mk', 'linan201050', 201050),
|
---|
10 | ('Angel', 'Nasev', 'angel.nasev', 'angel.nasev@students.finki.ukim.mk', 'angeln201051', 201051),
|
---|
11 | ('Katerina', 'Smileska', 'katerina.smileska', 'katerina.smileska@students.finki.ukim.mk', 'katerinas201052', 201052);
|
---|
12 |
|
---|
13 | insert into profesori(p_ime, p_prezime, p_korisnicko_ime, p_email, p_lozinka)
|
---|
14 | values
|
---|
15 | ('Vangel', 'Ajanovski', 'vangel.ajanovski', 'vangel.ajanovski@finki.ukim.mk', 'vangela'),
|
---|
16 | ('Nenad', 'Ancev', 'nenad.ancev', 'nenad.ancev@finki.ukim.mk', 'nenada'),
|
---|
17 | ('Sasho', 'Gramatikov', 'sasho.gramatikov', 'sasho.gramatikov@finki.ukim.mk', 'sashog'),
|
---|
18 | ('Goran', 'Velinov', 'goran.velinov', 'goran.velinov@finki.ukim.mk', 'goranv');
|
---|
19 |
|
---|
20 | insert into predmeti(pr_ime, a_id)
|
---|
21 | values
|
---|
22 | ('Bazi na podatoci', (select a.a_id from administratori as a where a.a_korisnicko_ime= 'admin1')),
|
---|
23 | ('Veb programiranje', (select a.a_id from administratori as a where a.a_korisnicko_ime = 'admin1')),
|
---|
24 | ('Kompjuterski mrezi i bezbednost', (select a.a_id from administratori as a where a.a_korisnicko_ime = 'admin1')),
|
---|
25 | ('Kompjuterska etika', (select a.a_id from administratori as a where a.a_korisnicko_ime = 'admin1'));
|
---|
26 |
|
---|
27 | insert into kursevi(ku_ime, ku_opis, pr_id)
|
---|
28 | values
|
---|
29 | ('Bazi na podatoci - VA', 'Predmet na fakultetot finki', (select p.pr_id from predmeti as p where pr_ime = 'Bazi na podatoci')),
|
---|
30 | ('Bazi na podatoci - GV',null, (select p.pr_id from predmeti as p where pr_ime = 'Bazi na podatoci')),
|
---|
31 | ('Veb programiranje','Izucuvanje na tehnologiite na Spring', (select p.pr_id from predmeti as p where pr_ime = 'Veb programiranje'));
|
---|
32 |
|
---|
33 | insert into kategorii(ka_ime, ka_opis, a_id)
|
---|
34 | values
|
---|
35 | ('Auditoriski vezbi', 'Prasanja povrzani so auditoriskite vezbi', (select a.a_id from administratori as a where a.a_korisnicko_ime= 'admin1')),
|
---|
36 | ('Predavanja', 'Prasanja povrzani so predavanjata', (select a.a_id from administratori as a where a.a_korisnicko_ime= 'admin1')),
|
---|
37 | ('Laboratoriski vezbi', 'Prasanja povrzani so laboratoriskite vezbi', (select a.a_id from administratori as a where a.a_korisnicko_ime= 'admin1')),
|
---|
38 | ('Ispit', 'Prasanja povrzani so ispiti', (select a.a_id from administratori as a where a.a_korisnicko_ime= 'admin1')),
|
---|
39 | ('Kolokvium', 'Prasanja povrzani so kolokvium', (select a.a_id from administratori as a where a.a_korisnicko_ime= 'admin1')),
|
---|
40 | ('Administracija', 'Prasanja povrzani so administracija', (select a.a_id from administratori as a where a.a_korisnicko_ime= 'admin1'));
|
---|
41 |
|
---|
42 | insert into prof_term_za_kons(ptk_id, p_id, termin)
|
---|
43 | values (0, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'vangel.ajanovski'),
|
---|
44 | '2022-12-12 10:00:00'),
|
---|
45 | (1, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'vangel.ajanovski'),
|
---|
46 | '2022-12-15 10:00:00'),
|
---|
47 | (2, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'sasho.gramatikov'),
|
---|
48 | '2022-12-10 9:30:00');
|
---|
49 |
|
---|
50 | insert into e_prof_na(pn_id, p_id, ku_id)
|
---|
51 | values (0, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'vangel.ajanovski'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - VA')),
|
---|
52 | (1, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'sasho.gramatikov'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Veb programiranje')),
|
---|
53 | (2, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'goran.velinov'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - GV'));
|
---|
54 |
|
---|
55 | insert into materijali(m_ime,p_id,ka_id,ku_id)
|
---|
56 | values
|
---|
57 | ('Database System Concepts',(select p.p_id from profesori as p where p.p_korisnicko_ime = 'vangel.ajanovski'),(select ka.ka_id from kategorii as ka where ka.ka_ime = 'Predavanja'),(select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - VA')),
|
---|
58 | ('Spring Data Persistence',(select p.p_id from profesori as p where p.p_korisnicko_ime = 'sasho.gramatikov'),(select ka.ka_id from kategorii as ka where ka.ka_ime = 'Predavanja'),(select ku.ku_id from kursevi as ku where ku.ku_ime = 'Veb programiranje')),
|
---|
59 | ('Mapiracka Transformacija',(select p.p_id from profesori as p where p.p_korisnicko_ime = 'nenad.ancev'),(select ka.ka_id from kategorii as ka where ka.ka_ime = 'Auditoriski vezbi'),(select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - VA'));
|
---|
60 |
|
---|
61 | insert into prasanja(pra_naslov,pra_sodrzina,pra_datum,ku_id,s_id)
|
---|
62 | values
|
---|
63 | ('Kako da ponistam transakcija','Koristev transakcija za izvrsuvanje nekolku naredbi, no edna od niv bese neuspesna. Sega kako mozam da se vratam na sostojbata pred zapocnuvanjeto na transakcijata?','2022-12-05 20:38:00',(select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - VA'),(select s.s_id from studenti as s where s.s_korisnicko_ime='angel.nasev')),
|
---|
64 | ('Tip na podatok za datoteki vo PostgreSQL','Sakam vo mojot proekt da dodadam atribut koj ke cuva datoteka. Kako mozam da go napravam toa?','2022-12-03 10:00:00',(select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - VA'),(select s.s_id from studenti as s where s.s_korisnicko_ime='lina.nakova')),
|
---|
65 | ('Ne mozam da pristapam do delot za rabota so bazi vo IntelliJ','Vo auditoriskite vezbi, profesorot ima kopce na koe moze da gi gleda site tabeli i semata na bazata. Kaj mene toa kopce ne postoi. Sto e problemot? Kako bi go resil?','2022-12-01 12:30:00',(select ku.ku_id from kursevi as ku where ku.ku_ime = 'Veb programiranje'),(select s.s_id from studenti as s where s.s_korisnicko_ime='katerina.smileska'));
|
---|
66 |
|
---|
67 | insert into odgovori(o_sodrzina,o_validen,o_datum,pra_id,s_id,p_id)
|
---|
68 | values
|
---|
69 | ('Dobar nacin za cuvanje datoteki e ako se koristi atribut od tip text koj ke sodrzi pateka do dokumentot',true,'2022-12-03 17:45:00',(select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Tip na podatok za datoteki vo PostgreSQL'),null,(select p.p_id from profesori as p where p.p_korisnicko_ime = 'nenad.ancev')),
|
---|
70 | ('Za vrakanje na prvicnata sostojba treba da se koristi rollback komandata',false,'2022-12-06 08:05:00',(select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Kako da ponistam transakcija'),(select s.s_id from studenti as s where s.s_korisnicko_ime='lina.nakova'),null),
|
---|
71 | ('Ovaa funkcionalnost e dostapna samo kaj IntelliJ Ultimate. Mozete da go koristite besplatno so vnesuvanje na vasiot studentski mail',true,'2022-12-03 15:27:00',(select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Ne mozam da pristapam do delot za rabota so bazi vo IntelliJ'),null,(select p.p_id from profesori as p where p.p_korisnicko_ime = 'sasho.gramatikov'));
|
---|
72 |
|
---|
73 | insert into e_vo_vrska_so(vs_id, pra_id, m_id)
|
---|
74 | values (0, (select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Kako da ponistam transakcija'), (select m.m_id from materijali as m where m.m_ime = 'Database System Concepts')),
|
---|
75 | (1, (select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Ne mozam da pristapam do delot za rabota so bazi vo IntelliJ'), (select m.m_id from materijali as m where m.m_ime = 'Spring Data Persistence')),
|
---|
76 | (2, (select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Tip na podatok za datoteki vo PostgreSQL'), (select m.m_id from materijali as m where m.m_ime = 'Database System Concepts'));
|
---|
77 |
|
---|
78 | insert into moze_da_slusa(mds_id, s_id, ku_id)
|
---|
79 | values (0, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'angel.nasev'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - VA')),
|
---|
80 | (1, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'angel.nasev'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Veb programiranje')),
|
---|
81 | (2, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'lina.nakova'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - VA')),
|
---|
82 | (3, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'lina.nakova'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Veb programiranje')),
|
---|
83 | (4, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'katerina.smileska'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Bazi na podatoci - GV')),
|
---|
84 | (5, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'katerina.smileska'), (select ku.ku_id from kursevi as ku where ku.ku_ime = 'Veb programiranje'));
|
---|
85 |
|
---|
86 | insert into e_oznaceno_so(os_id, pra_id, ka_id)
|
---|
87 | values (0, (select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Tip na podatok za datoteki vo PostgreSQL'), (select ka.ka_id from kategorii as ka where ka.ka_ime = 'Auditoriski vezbi')),
|
---|
88 | (1, (select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Tip na podatok za datoteki vo PostgreSQL'), (select ka.ka_id from kategorii as ka where ka.ka_ime = 'Laboratoriski vezbi')),
|
---|
89 | (2, (select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Kako da ponistam transakcija'), (select ka.ka_id from kategorii as ka where ka.ka_ime = 'Predavanja')),
|
---|
90 | (3, (select pra.pra_id from prasanja as pra where pra.pra_naslov = 'Ne mozam da pristapam do delot za rabota so bazi vo IntelliJ'), (select ka.ka_id from kategorii as ka where ka.ka_ime = 'Auditoriski vezbi'));
|
---|
91 |
|
---|
92 | insert into dava_reakcija(dr_id, p_id, o_id, reakcija)
|
---|
93 | values (0, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'vangel.ajanovski'),
|
---|
94 | (select o.o_id from odgovori as o where o.o_sodrzina = 'Dobar nacin za cuvanje datoteki e ako se koristi atribut od tip text koj ke sodrzi pateka do dokumentot'), true),
|
---|
95 | (1, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'vangel.ajanovski'),
|
---|
96 | (select o.o_id from odgovori as o where o.o_sodrzina = 'Za vrakanje na prvicnata sostojba treba da se koristi rollback komandata'), true),
|
---|
97 | (2, (select p.p_id from profesori as p where p.p_korisnicko_ime = 'goran.velinov'),
|
---|
98 | (select o.o_id from odgovori as o where o.o_sodrzina = 'Dobar nacin za cuvanje datoteki e ako se koristi atribut od tip text koj ke sodrzi pateka do dokumentot'), true);
|
---|
99 |
|
---|
100 | insert into reagira_na(rn_id, s_id, o_id, reakcija)
|
---|
101 | values (0, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'angel.nasev'), (select o.o_id from odgovori as o where o.o_sodrzina = 'Ovaa funkcionalnost e dostapna samo kaj IntelliJ Ultimate. Mozete da go koristite besplatno so vnesuvanje na vasiot studentski mail'), false),
|
---|
102 | (1, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'lina.nakova'), (select o.o_id from odgovori as o where o.o_sodrzina = 'Ovaa funkcionalnost e dostapna samo kaj IntelliJ Ultimate. Mozete da go koristite besplatno so vnesuvanje na vasiot studentski mail'), true),
|
---|
103 | (2, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'angel.nasev'), (select o.o_id from odgovori as o where o.o_sodrzina = 'Dobar nacin za cuvanje datoteki e ako se koristi atribut od tip text koj ke sodrzi pateka do dokumentot'), true),
|
---|
104 | (3, (select s.s_id from studenti as s where s.s_korisnicko_ime = 'katerina.smileska'), (select o.o_id from odgovori as o where o.o_sodrzina = 'Za vrakanje na prvicnata sostojba treba da se koristi rollback komandata'), true); |
---|