drop view if exists rpcou;
drop view if exists citingu;
drop view if exists citiraniu;
+drop view if exists radoviu;
drop table if exists utca;
create table utca (
ca text
);
+drop table if exists radovi;
+create table radovi (
+ ca text,
+ ut text,
+ pt text,
+ au text,
+ af text,
+ ti text,
+ so text,
+ la text,
+ dt text,
+ de text,
+ id text,
+ c1 text,
+ rp text,
+ nr integer,
+ tc integer,
+ pi text,
+ py integer,
+ di text,
+ sc text
+);
+
+drop table if exists radoviau;
+create table radoviau (
+ ut text,
+ au text
+);
drop table if exists citing;
create table citing (
- id serial,
ut text,
pt text,
au text,
so text,
la text,
dt text,
+ de text,
+ id text,
c1 text,
rp text,
nr integer,
cr_year text,
cr_vol text,
cr_page text,
- ttc integer,
- cr text,
- can text,
- isi text
+ catc integer,
+ cr_full text,
+ isi text,
+ camb integer
);
create view citingu as select distinct ut,pt,au,so,la,dt,nr,tc,pi,py,di,sc,rp from citing ;
+create view radoviu as select distinct ut,pt,au,so,la,dt,nr,tc,pi,py,di,sc,rp from radovi ;
+
create view rpcou as select distinct * from rpco ;
create view parovi as select distinct citirani.ca,
- citirani.cr,
+ citirani.cr_full as cr,
cited.cr_full,
cited.ut,
citingu.pt,
citingu.sc,
citingu.rp
from citirani
-left join cited on citirani.cr = cited.cr_full
+left join cited on citirani.cr_full = cited.cr_full
left join citingu on cited.ut = citingu.ut
left join rpcou on cited.ut = rpcou.ut
;
-create view citiraniu as select distinct cr_auth,cr_ref,cr_year,cr_vol,cr_page,ttc,cr,isi from citirani ;
+create view citiraniu as select distinct cr_auth,cr_ref,cr_year,cr_vol,cr_page,catc,cr_full,isi from citirani ;
drop table if exists cropsy;