

insert into kursevi(ku_ime, ku_opis, pr_id)
values 
	('Bazi na podatoci - VA', 'Predmet na fakultetot finki', (select p.pr_id from predmeti as p where pr_ime = 'Bazi na podatoci')),
 	('Bazi na podatoci - GV',null, (select p.pr_id from predmeti as p where pr_ime = 'Bazi na podatoci')),
 	('Veb programiranje','Izucuvanje na tehnologiite na Spring', (select p.pr_id from predmeti as p where pr_ime = 'Veb programiranje'));
	
insert into e_vo_vrska_so(pra_id,m_id)
values
	((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')),
	((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')),
	((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'));
	
insert into e_oznaceno_so(pra_id,ka_id)
values
	((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')),
	((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')),
	((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')),
	((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'));
