/[libdata]/branches/pear-db/my2pg/libdata.pgsql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /branches/pear-db/my2pg/libdata.pgsql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 80 - (hide annotations)
Thu Mar 18 22:49:15 2004 UTC (20 years ago) by dpavlin
File size: 49208 byte(s)
changes for new database structure in 2.00

1 dpavlin 34 ------------------------------------------------------------------
2     -- My2Pg 1.28 translated dump
3     --
4     ------------------------------------------------------------------
5    
6     BEGIN;
7    
8    
9    
10    
11     --
12     -- Sequences for table ACCESS
13     --
14    
15     CREATE SEQUENCE access_access_id_seq;
16    
17     -- MySQL dump 9.10
18     --
19     -- Host: localhost Database: libdata
20     -- ------------------------------------------------------
21     -- Server version 4.0.18-log
22    
23     --
24     -- Table structure for table `access`
25     --
26    
27     CREATE TABLE access (
28     access_id INT4 DEFAULT nextval('access_access_id_seq'),
29     access_level INT4 DEFAULT NULL,
30     access varchar(25) DEFAULT NULL,
31     PRIMARY KEY (access_id)
32    
33     );
34    
35     --
36     -- Dumping data for table `access`
37     --
38    
39     INSERT INTO access VALUES (1,0,'Denied');
40     INSERT INTO access VALUES (2,10,'Guest');
41     INSERT INTO access VALUES (3,20,'Author');
42     INSERT INTO access VALUES (4,100,'Manager');
43     INSERT INTO access VALUES (5,1000,'DBA');
44    
45     --
46     -- Table structure for table `campus`
47     --
48    
49    
50    
51     --
52     -- Sequences for table CAMPUS
53     --
54    
55     CREATE SEQUENCE campus_campus_id_seq;
56    
57     CREATE TABLE campus (
58     campus_id INT4 DEFAULT nextval('campus_campus_id_seq'),
59     campus varchar(50) DEFAULT NULL,
60     institution varchar(10) DEFAULT NULL,
61     PRIMARY KEY (campus_id)
62    
63     );
64    
65     --
66     -- Dumping data for table `campus`
67     --
68    
69     INSERT INTO campus VALUES (1,'(N/A)','(N/A)');
70    
71     --
72     -- Table structure for table `coursesub`
73     --
74    
75    
76    
77     --
78     -- Sequences for table COURSESUB
79     --
80    
81     CREATE SEQUENCE coursesub_coursesub_id_seq;
82    
83     CREATE TABLE coursesub (
84     coursesub_id INT4 DEFAULT nextval('coursesub_coursesub_id_seq'),
85     coursesub varchar(15) DEFAULT NULL,
86     coursesub_descr varchar(100) DEFAULT NULL,
87     cip_code varchar(50) DEFAULT NULL,
88 dpavlin 43 campus_id INT4 references campus(campus_id) on delete cascade on update cascade,
89 dpavlin 34 PRIMARY KEY (coursesub_id)
90    
91     );
92    
93     --
94     -- Dumping data for table `coursesub`
95     --
96    
97     INSERT INTO coursesub VALUES (1,'(N/A)','(N/A)',NULL,NULL);
98     INSERT INTO coursesub VALUES (554,'ASTRO','Astronomy','',1);
99     INSERT INTO coursesub VALUES (553,'ANTH','Anthropology','',1);
100     INSERT INTO coursesub VALUES (555,'PSIHO','Uvod u psihologiju','',1);
101    
102     --
103     -- Table structure for table `term`
104     --
105    
106    
107    
108     --
109     -- Sequences for table TERM
110     --
111    
112     CREATE SEQUENCE term_term_id_seq;
113    
114     CREATE TABLE term (
115     term_id INT4 DEFAULT nextval('term_term_id_seq'),
116     term varchar(150) DEFAULT NULL,
117     PRIMARY KEY (term_id)
118    
119     );
120    
121     --
122     -- Dumping data for table `term`
123     --
124    
125     INSERT INTO term VALUES (1,'(N/A)');
126     INSERT INTO term VALUES (2,'Fall Semester');
127     INSERT INTO term VALUES (3,'Spring Semester');
128     INSERT INTO term VALUES (4,'Summer Term');
129    
130     --
131     -- Table structure for table `style`
132     --
133    
134    
135    
136     --
137     -- Sequences for table STYLE
138     --
139    
140     CREATE SEQUENCE style_style_id_seq;
141    
142     CREATE TABLE style (
143     style_id INT4 DEFAULT nextval('style_style_id_seq'),
144     style_title varchar(100) DEFAULT NULL,
145     header_file varchar(255) DEFAULT NULL,
146     footer_file varchar(255) DEFAULT NULL,
147     css_file varchar(255) DEFAULT NULL,
148     PRIMARY KEY (style_id)
149    
150     );
151    
152     --
153     -- Dumping data for table `style`
154     --
155    
156     INSERT INTO style VALUES (1,'(N/A)',NULL,NULL,NULL);
157     INSERT INTO style VALUES (2,'LibData Standard','header.phtml','footer.phtml','libdata.css');
158     INSERT INTO style VALUES (10,'LibData Inverse Demo','styles/libinverse/header.phtml','styles/libinverse/footer.phtml','styles/libinverse/libdata.css');
159    
160     --
161     -- Table structure for table `pagetype`
162     --
163    
164    
165    
166     --
167     -- Sequences for table PAGETYPE
168     --
169    
170     CREATE SEQUENCE pagetype_pagetype_id_seq;
171    
172     CREATE TABLE pagetype (
173     pagetype_id INT4 DEFAULT nextval('pagetype_pagetype_id_seq'),
174     pagetype varchar(50) DEFAULT NULL,
175     PRIMARY KEY (pagetype_id)
176    
177     );
178    
179     --
180     -- Dumping data for table `pagetype`
181     --
182    
183     INSERT INTO pagetype VALUES (1,'(N/A)');
184     INSERT INTO pagetype VALUES (2,'Free Form');
185     INSERT INTO pagetype VALUES (3,'CourseLib');
186    
187     --
188     -- Table structure for table `page`
189     --
190    
191    
192    
193     --
194     -- Sequences for table PAGE
195     --
196    
197     CREATE SEQUENCE page_page_id_seq;
198    
199     CREATE TABLE page (
200     page_id INT4 DEFAULT nextval('page_page_id_seq'),
201     date_created TIMESTAMP DEFAULT NULL,
202     date_modified TIMESTAMP DEFAULT NULL,
203     account_created varchar(20) DEFAULT NULL,
204     account_modified varchar(20) DEFAULT NULL,
205     staff_coordinator INT4 DEFAULT NULL,
206 dpavlin 43 style_id INT4 references style(style_id) on delete cascade on update cascade,
207     pagetype_id INT4 references pagetype(pagetype_id) on delete cascade on update cascade,
208 dpavlin 34 page_title varchar(255) DEFAULT NULL,
209 dpavlin 43 pagetitle_style INT2 references style(style_id) on delete cascade on update cascade,
210 dpavlin 34 published char(1) DEFAULT NULL,
211     display_urls char(1) DEFAULT NULL,
212     display_toc char(1) DEFAULT NULL,
213     wrap_toc char(1) DEFAULT NULL,
214     display_up char(1) DEFAULT NULL,
215     up_text varchar(50) DEFAULT NULL,
216     pageheader text,
217     pageHTML text,
218     page_debug char(1) DEFAULT NULL,
219     PRIMARY KEY (page_id)
220    
221     );
222    
223     --
224     -- Dumping data for table `page`
225     --
226    
227     INSERT INTO page VALUES (4,'2003-09-24 09:29:36','2004-03-04 00:52:57','admin','admin',2,2,2,'Further SETI Resources',NULL,'1',NULL,'0',NULL,'1','[Return to Top]','header',NULL,NULL);
228     INSERT INTO page VALUES (15,'2003-10-06 10:01:31','2004-02-17 00:14:32','admin','admin',2,2,3,'Advanced Topics in Astronomy',NULL,'1','0','1','0','1','[Return to Top]',NULL,NULL,NULL);
229     INSERT INTO page VALUES (17,'2004-03-03 20:57:24','2004-03-03 21:02:04','admin','admin',2,2,2,'Knji¾nica psihologije',1,'1','0','0','1','1','[Return to Top]','',NULL,NULL);
230     INSERT INTO page VALUES (18,'2004-03-04 00:52:57','2004-03-04 00:57:05','admin','admin',2,2,2,'Copy of: Further SETI Resources',NULL,NULL,NULL,'0',NULL,'0','[Return to Top]',NULL,NULL,NULL);
231     INSERT INTO page VALUES (19,'2004-03-04 13:37:08','2004-03-04 13:52:12','admin','admin',3,1,2,'Vijesti',null,'1','0','1','0','0','[Return to Top]','Ova stranica sadrži popis zanimljivih vijeti iz različitih područja bibliotekarstva.',NULL,NULL);
232    
233    
234     --
235     -- Table structure for table `course`
236     --
237    
238    
239    
240     --
241     -- Sequences for table COURSE
242     --
243    
244     CREATE SEQUENCE course_course_id_seq;
245    
246     CREATE TABLE course (
247     course_id INT4 DEFAULT nextval('course_course_id_seq'),
248 dpavlin 43 page_id INT4 references page(page_id) on delete cascade on update cascade,
249     coursesub_id INT4 references coursesub(coursesub_id) on delete cascade on update cascade,
250 dpavlin 34 course_num varchar(50) DEFAULT NULL,
251     course_section varchar(10) DEFAULT NULL,
252     course_concat varchar(255) DEFAULT NULL,
253 dpavlin 43 term_id INT4 references term(term_id) on delete cascade on update cascade,
254 dpavlin 34 course_year varchar(4) DEFAULT NULL,
255 dpavlin 43 campus_id INT4 references campus(campus_id) on delete cascade on update cascade,
256 dpavlin 34 courseheader varchar(255) DEFAULT NULL,
257     introheader1 text,
258     intromessage1 text,
259     introheader2 text,
260     intromessage2 text,
261     PRIMARY KEY (course_id)
262    
263     );
264    
265     --
266     -- Dumping data for table `course`
267     --
268    
269     INSERT INTO course VALUES (8,15,554,'909','1','ASTRO 909: Advanced Topics in Astronomy',2,'2003',NULL,'Information Resources for:','Course Description','This course serves as a cross-displinary introduction to xenobiology.',NULL,NULL);
270    
271     --
272     -- Table structure for table `stafftitle`
273     --
274    
275    
276    
277     --
278     -- Sequences for table STAFFTITLE
279     --
280    
281     CREATE SEQUENCE stafftitle_stafftitle_id_seq;
282    
283     CREATE TABLE stafftitle (
284     stafftitle_id INT4 DEFAULT nextval('stafftitle_stafftitle_id_seq'),
285     stafftitle varchar(50) DEFAULT NULL,
286     PRIMARY KEY (stafftitle_id)
287    
288     );
289    
290     --
291     -- Dumping data for table `stafftitle`
292     --
293    
294     INSERT INTO stafftitle VALUES (1,'(N/A)');
295     INSERT INTO stafftitle VALUES (2,'Web Applications Developer');
296     INSERT INTO stafftitle VALUES (3,'Info Tech Prof');
297     INSERT INTO stafftitle VALUES (4,'Librarian');
298     INSERT INTO stafftitle VALUES (5,'Faculty');
299     INSERT INTO stafftitle VALUES (6,'Professor');
300     INSERT INTO stafftitle VALUES (7,'Assistant Professor');
301     INSERT INTO stafftitle VALUES (8,'Associate Professor');
302     INSERT INTO stafftitle VALUES (16,'Instructor');
303     INSERT INTO stafftitle VALUES (17,'TA');
304    
305     --
306     -- Table structure for table `staff`
307     --
308    
309    
310    
311     --
312     -- Sequences for table STAFF
313     --
314    
315     CREATE SEQUENCE staff_staff_id_seq;
316    
317     CREATE TABLE staff (
318     staff_id INT4 DEFAULT nextval('staff_staff_id_seq'),
319     staff_account varchar(20) DEFAULT NULL,
320     staff_email varchar(50) DEFAULT NULL,
321     password varchar(32) DEFAULT NULL,
322     last_name varchar(75) DEFAULT NULL,
323     first_name varchar(75) DEFAULT NULL,
324     last_login TIMESTAMP DEFAULT NULL,
325     last_ip varchar(15) DEFAULT NULL,
326     date_created TIMESTAMP DEFAULT NULL,
327     date_modified TIMESTAMP DEFAULT NULL,
328 dpavlin 43 access_id INT4 references access(access_id) on delete cascade on update cascade,
329     stafftitle_id INT4 references stafftitle(stafftitle_id) on delete cascade on update cascade,
330 dpavlin 34 PRIMARY KEY (staff_id)
331    
332     );
333    
334     --
335     -- Dumping data for table `staff`
336     --
337    
338     INSERT INTO staff VALUES (1,'(N/A)','(N/A)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,5,NULL);
339     INSERT INTO staff VALUES (2,'admin','admin@yourlibrary.edu','5f3a215f2c55a516','Administrator','System','2004-03-04 13:31:03','193.198.214.118',NULL,NULL,5,3);
340     INSERT INTO staff VALUES (3,'mglavica','mglavica@ffzg.hr','2b8a357b7963a990','Glavica','Marijana','2004-03-04 13:54:17','193.198.214.118',NULL,NULL,4,5);
341     INSERT INTO staff VALUES (4,'dpavlin','dpavlin@mjesec.ffzg.hr','0778c26e0ed1e1ad','Pavlinušić','Dobrica',NULL,NULL,NULL,NULL,5,2);
342    
343     --
344     -- Table structure for table `faculty`
345     --
346    
347    
348    
349     --
350     -- Sequences for table FACULTY
351     --
352    
353     CREATE SEQUENCE faculty_faculty_id_seq;
354    
355     CREATE TABLE faculty (
356     faculty_id INT4 DEFAULT nextval('faculty_faculty_id_seq'),
357     faculty_lastname varchar(75) DEFAULT NULL,
358     faculty_firstname varchar(75) DEFAULT NULL,
359     faculty_email varchar(50) DEFAULT NULL,
360     faculty_account varchar(20) DEFAULT NULL,
361     PRIMARY KEY (faculty_id)
362    
363     );
364    
365     --
366     -- Dumping data for table `faculty`
367     --
368    
369     INSERT INTO faculty VALUES (1,NULL,NULL,NULL,'(N/A)');
370     INSERT INTO faculty VALUES (123,'Smith','Joe','joe001@yourlibrary.edu','joe001');
371    
372    
373     --
374     -- Table structure for table `course_personnel`
375     --
376    
377    
378    
379     --
380     -- Sequences for table COURSE_PERSONNEL
381     --
382    
383     CREATE SEQUENCE course_personnel_personnel_i;
384    
385     CREATE TABLE course_personnel (
386     personnel_id INT4 DEFAULT nextval('course_personnel_personnel_i'),
387 dpavlin 43 course_id INT4 references course(course_id) on delete cascade on update cascade,
388     stafftitle_id INT4 references stafftitle(stafftitle_id) on delete cascade on update cascade,
389     staff_id INT4 references staff(staff_id) on delete cascade on update cascade,
390     faculty_id INT4 references faculty(faculty_id) on delete cascade on update cascade,
391 dpavlin 34 pers_email varchar(40) DEFAULT NULL,
392     pers_account varchar(20) DEFAULT NULL,
393     pers_lastname varchar(50) DEFAULT NULL,
394     pers_firstname varchar(20) DEFAULT NULL,
395     PRIMARY KEY (personnel_id)
396    
397     );
398    
399     --
400     -- Dumping data for table `course_personnel`
401     --
402    
403     INSERT INTO course_personnel VALUES (4,8,7,2,NULL,NULL,NULL,NULL,NULL);
404    
405     --
406     -- Table structure for table `service`
407     --
408    
409    
410    
411     --
412     -- Sequences for table SERVICE
413     --
414    
415     CREATE SEQUENCE service_service_id_seq;
416    
417     CREATE TABLE service (
418     service_id INT4 DEFAULT nextval('service_service_id_seq'),
419     service varchar(100) DEFAULT NULL,
420     serviceURL varchar(150) DEFAULT NULL,
421     serviceDescr text,
422     address1 varchar(50) DEFAULT NULL,
423     address2 varchar(50) DEFAULT NULL,
424     address3 varchar(50) DEFAULT NULL,
425     address4 varchar(50) DEFAULT NULL,
426     telephone varchar(20) DEFAULT NULL,
427     fax varchar(20) DEFAULT NULL,
428     email varchar(40) DEFAULT NULL,
429     nonaff char(1) DEFAULT NULL,
430     PRIMARY KEY (service_id)
431    
432     );
433    
434     --
435     -- Dumping data for table `service`
436     --
437    
438     INSERT INTO service VALUES (1,'(N/A)','','','','','','','','','','0');
439    
440     --
441     -- Table structure for table `servicetype`
442     --
443    
444    
445    
446     --
447     -- Sequences for table SERVICETYPE
448     --
449    
450     CREATE SEQUENCE servicetype_servicetype_id_s;
451    
452     CREATE TABLE servicetype (
453     servicetype_id INT4 DEFAULT nextval('servicetype_servicetype_id_s'),
454     servicetype varchar(75) DEFAULT NULL,
455     PRIMARY KEY (servicetype_id)
456    
457     );
458    
459     --
460     -- Dumping data for table `servicetype`
461     --
462    
463    
464     --
465     -- Table structure for table `location`
466     --
467    
468    
469    
470     --
471     -- Sequences for table LOCATION
472     --
473    
474     CREATE SEQUENCE location_location_id_seq;
475    
476     CREATE TABLE location (
477     location_id INT4 DEFAULT nextval('location_location_id_seq'),
478     location varchar(255) DEFAULT NULL,
479     location_descr text,
480     campus varchar(255) DEFAULT NULL,
481     address1 varchar(255) DEFAULT NULL,
482     address2 varchar(255) DEFAULT NULL,
483     address3 varchar(255) DEFAULT NULL,
484     address4 varchar(255) DEFAULT NULL,
485     telephone varchar(100) DEFAULT NULL,
486     mainURL varchar(255) DEFAULT NULL,
487     referenceURL varchar(255) DEFAULT NULL,
488     mapURL varchar(255) DEFAULT NULL,
489     hoursURL varchar(255) DEFAULT NULL,
490     PRIMARY KEY (location_id)
491    
492     );
493    
494     --
495     -- Dumping data for table `location`
496     --
497    
498     INSERT INTO location VALUES (1,'(N/A)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
499     INSERT INTO location VALUES (55,'Virtual Web Library','Resources here are all freely available on the internet.','','','','','','','','','','');
500     INSERT INTO location VALUES (58,'Smith Library','State of the art facility with over 120 million print volumes, climate controlled with super computers for public use.','','','','','','','http://www.google.com','','','');
501    
502     INSERT INTO servicetype VALUES (1,'(N/A)');
503    
504     --
505     -- Table structure for table `subject`
506     --
507    
508    
509    
510     --
511     -- Sequences for table SUBJECT
512     --
513    
514     CREATE SEQUENCE subject_subject_id_seq;
515    
516     CREATE TABLE subject (
517     subject_id INT4 DEFAULT nextval('subject_subject_id_seq'),
518     subject varchar(75) NOT NULL DEFAULT '',
519     subject_descr text,
520 dpavlin 43 sublocation_id INT4 references location(location_id) on delete cascade on update cascade,
521 dpavlin 34 rqs_date_created TIMESTAMP DEFAULT NULL,
522     rqs_date_modified TIMESTAMP DEFAULT NULL,
523     rqs_account_created varchar(20) DEFAULT NULL,
524     rqs_account_modified varchar(20) DEFAULT NULL,
525     rqs_published char(1) DEFAULT NULL,
526     PRIMARY KEY (subject_id)
527    
528     );
529    
530     --
531     -- Dumping data for table `subject`
532     --
533    
534     INSERT INTO subject VALUES (1,'(N/A)',NULL,NULL,'2003-08-27 10:07:20','2003-08-27 10:07:50','staff','staff','1');
535     INSERT INTO subject VALUES (2,'Astrobiology','Encompasses the search for extraterrestrial intelligence (commonly abbreviated as SETI), as well as an interdisciplinary mix of both astronomy and biology.',58,'2003-09-16 16:02:50','2004-03-02 16:09:02','admin','admin','1');
536     INSERT INTO subject VALUES (3,'xxx3','',1,'2004-02-17 00:24:53','2004-03-03 20:54:57','admin','admin','1');
537     INSERT INTO subject VALUES (4,'xxx4','',1,'2004-02-17 00:24:53','2004-03-03 20:54:57','admin','admin','1');
538     INSERT INTO subject VALUES (5,'xxx5','',1,'2004-02-17 00:24:53','2004-03-03 20:54:57','admin','admin','1');
539     INSERT INTO subject VALUES (6,'Psihologija','',1,'2004-02-17 00:24:53','2004-03-03 20:54:57','admin','admin','1');
540     INSERT INTO subject VALUES (7,'Tehnika','Informacijski izvori za podruèje tehnike',1,'2004-03-02 15:54:37','2004-03-02 16:15:49','admin','admin','1');
541     INSERT INTO subject VALUES (8,'xxx8','',1,'2004-02-17 00:24:53','2004-03-03 20:54:57','admin','admin','1');
542    
543     --
544     -- Table structure for table `mastersubject`
545     --
546    
547    
548    
549     --
550     -- Sequences for table MASTERSUBJECT
551     --
552    
553     CREATE SEQUENCE mastersubject_mastersubject_;
554    
555     CREATE TABLE mastersubject (
556     mastersubject_id INT4 DEFAULT nextval('mastersubject_mastersubject_'),
557     mastersubject varchar(50) NOT NULL DEFAULT '',
558     PRIMARY KEY (mastersubject_id)
559    
560     );
561    
562     --
563     -- Dumping data for table `mastersubject`
564     --
565    
566     INSERT INTO mastersubject VALUES (1,'(N/A)');
567     INSERT INTO mastersubject VALUES (2,'(All)');
568     INSERT INTO mastersubject VALUES (3,'Agriculture, Biology, Ecology');
569     INSERT INTO mastersubject VALUES (4,'Humanistika');
570     INSERT INTO mastersubject VALUES (5,'Business and Economics');
571     INSERT INTO mastersubject VALUES (6,'Prirodoslovlje');
572     INSERT INTO mastersubject VALUES (7,'Health and Medicine');
573     INSERT INTO mastersubject VALUES (8,'Law');
574     INSERT INTO mastersubject VALUES (9,'Dru¹tvene znanosti');
575     INSERT INTO mastersubject VALUES (10,'General');
576     INSERT INTO mastersubject VALUES (11,'Biomedicina');
577     INSERT INTO mastersubject VALUES (12,'Tehnika');
578    
579     --
580 dpavlin 58 -- Table structure for table `masterinfotype`
581     --
582    
583    
584    
585     --
586     -- Sequences for table MASTERINFOTYPE
587     --
588    
589     CREATE SEQUENCE masterinfotype_masterinfotyp;
590    
591     CREATE TABLE masterinfotype (
592     masterinfotype_id INT4 DEFAULT nextval('masterinfotype_masterinfotyp'),
593     masterinfotype varchar(75) NOT NULL DEFAULT '',
594     PRIMARY KEY (masterinfotype_id)
595    
596     );
597    
598     --
599     -- Dumping data for table `masterinfotype`
600     --
601    
602     INSERT INTO masterinfotype VALUES (1,'(N/A)');
603     INSERT INTO masterinfotype VALUES (2,'General Reference Sources');
604     INSERT INTO masterinfotype VALUES (3,'Abstracts and Indexes');
605     INSERT INTO masterinfotype VALUES (4,'Catalogs and Bibliographies');
606     INSERT INTO masterinfotype VALUES (5,'Primary Source Materials');
607     INSERT INTO masterinfotype VALUES (6,'Periodical and Newspaper subscriptions');
608     INSERT INTO masterinfotype VALUES (7,'Statistics and Data');
609     INSERT INTO masterinfotype VALUES (8,'Images Collections');
610     INSERT INTO masterinfotype VALUES (9,'Societies, Agencies, and Organizations');
611     INSERT INTO masterinfotype VALUES (10,'Style Manuals and Writing Guides');
612     INSERT INTO masterinfotype VALUES (11,'Internet Resources');
613     INSERT INTO masterinfotype VALUES (12,'University of Minnesota');
614     INSERT INTO masterinfotype VALUES (13,'WWW Resources');
615    
616     --
617 dpavlin 34 -- Table structure for table `infotype`
618     --
619    
620    
621    
622     --
623     -- Sequences for table INFOTYPE
624     --
625    
626     CREATE SEQUENCE infotype_infotype_id_seq;
627    
628     CREATE TABLE infotype (
629     infotype_id INT4 DEFAULT nextval('infotype_infotype_id_seq'),
630 dpavlin 58 masterinfotype_id INT4 references masterinfotype(masterinfotype_id) on delete cascade on update cascade,
631 dpavlin 43 mastersubject_id INT4 references mastersubject(mastersubject_id) on delete cascade on update cascade,
632 dpavlin 34 infotype varchar(75) NOT NULL DEFAULT '',
633     PRIMARY KEY (infotype_id)
634    
635     );
636    
637     --
638     -- Dumping data for table `infotype`
639     --
640    
641     INSERT INTO infotype VALUES (1,1,1,'(N/A)');
642     INSERT INTO infotype VALUES (2,2,2,'Almanacs');
643     INSERT INTO infotype VALUES (3,2,2,'Encyclopedias');
644     INSERT INTO infotype VALUES (4,2,2,'Field Guides');
645     INSERT INTO infotype VALUES (5,2,2,'Dictionaries');
646     INSERT INTO infotype VALUES (6,2,2,'Handbooks and Manuals');
647     INSERT INTO infotype VALUES (7,2,2,'Biographical Sources');
648     INSERT INTO infotype VALUES (8,2,2,'Directories');
649     INSERT INTO infotype VALUES (9,2,2,'Glossaries');
650     INSERT INTO infotype VALUES (10,2,2,'Reports');
651     INSERT INTO infotype VALUES (11,2,2,'Public Opinion Resources');
652     INSERT INTO infotype VALUES (12,2,2,'Yearbooks');
653     INSERT INTO infotype VALUES (13,2,2,'Speeches');
654     INSERT INTO infotype VALUES (14,2,4,'Atlases & Maps');
655     INSERT INTO infotype VALUES (15,2,2,'Chronologies');
656     INSERT INTO infotype VALUES (16,2,2,'Forms, Tests, Inventories');
657     INSERT INTO infotype VALUES (17,2,2,'General Reference Works');
658     INSERT INTO infotype VALUES (18,3,2,'Academic or Scholarly Articles Subject Indexes');
659     INSERT INTO infotype VALUES (19,3,2,'General Indexes to Magazine, Journal & Newspaper Articles');
660     INSERT INTO infotype VALUES (20,3,2,'Catalogs & Indexes to Government Publications');
661     INSERT INTO infotype VALUES (21,3,2,'Indexes, Other');
662     INSERT INTO infotype VALUES (22,4,2,'Bibliographies');
663     INSERT INTO infotype VALUES (23,4,2,'National Bibliographies');
664     INSERT INTO infotype VALUES (24,4,2,'Catalogs');
665     INSERT INTO infotype VALUES (25,5,2,'Reports');
666     INSERT INTO infotype VALUES (26,5,2,'Diaries');
667     INSERT INTO infotype VALUES (27,5,2,'Correspondence');
668     INSERT INTO infotype VALUES (28,5,2,'Speeches');
669     INSERT INTO infotype VALUES (29,6,2,'News Sources');
670     INSERT INTO infotype VALUES (30,6,2,'Journal Titles');
671     INSERT INTO infotype VALUES (31,6,2,'Magazine Titles');
672     INSERT INTO infotype VALUES (32,7,2,'Data Resources');
673     INSERT INTO infotype VALUES (33,7,2,'Statistical Guides');
674     INSERT INTO infotype VALUES (34,7,2,'Statistical Resources');
675     INSERT INTO infotype VALUES (35,8,2,'Atlases and Maps');
676     INSERT INTO infotype VALUES (37,9,2,'Trade & Professional Associations');
677     INSERT INTO infotype VALUES (38,10,2,'Guides to Working with Government Publications');
678     INSERT INTO infotype VALUES (39,10,2,'Research Guides');
679     INSERT INTO infotype VALUES (40,11,2,'Gateways & Megasites');
680     INSERT INTO infotype VALUES (41,11,2,'Search Engines');
681     INSERT INTO infotype VALUES (42,12,2,'Related U of M Web Sites');
682     INSERT INTO infotype VALUES (43,2,5,'Security Analysts\' Reports');
683     INSERT INTO infotype VALUES (44,2,5,'Doing Business in Another Country');
684     INSERT INTO infotype VALUES (45,2,5,'Financial Ratios');
685     INSERT INTO infotype VALUES (46,2,5,'Industry Profiles');
686     INSERT INTO infotype VALUES (47,2,5,'Market Research Surveys');
687     INSERT INTO infotype VALUES (48,2,5,'Tax Reporters');
688     INSERT INTO infotype VALUES (49,2,5,'Financial Reports');
689     INSERT INTO infotype VALUES (50,2,5,'Accounting Standards');
690     INSERT INTO infotype VALUES (51,2,5,'Nonprofit Finance');
691     INSERT INTO infotype VALUES (52,2,5,'Nonprofit Management');
692     INSERT INTO infotype VALUES (53,2,5,'Nonprofit Marketing');
693     INSERT INTO infotype VALUES (54,2,5,'Leadership History');
694     INSERT INTO infotype VALUES (55,2,5,'Leadership Landscapes, strategies and structures');
695     INSERT INTO infotype VALUES (56,2,5,'Books by and about Leaders');
696     INSERT INTO infotype VALUES (57,2,6,'Spectra');
697     INSERT INTO infotype VALUES (58,2,6,'Spectra, Atomic');
698     INSERT INTO infotype VALUES (59,2,6,'Spectra, General');
699     INSERT INTO infotype VALUES (60,2,6,'Spectra, Infrared');
700     INSERT INTO infotype VALUES (61,2,6,'Spectra, Mass');
701     INSERT INTO infotype VALUES (62,2,6,'Spectra, Nuclear Magnetic Resonance');
702     INSERT INTO infotype VALUES (63,2,6,'Spectra, Raman');
703     INSERT INTO infotype VALUES (64,2,6,'Spectra, Ultraviolet & Visible');
704     INSERT INTO infotype VALUES (65,2,6,'Chemical Compounds');
705     INSERT INTO infotype VALUES (66,2,6,'Data Compilations/Algorithms');
706     INSERT INTO infotype VALUES (67,2,6,'Organic Reactions');
707     INSERT INTO infotype VALUES (68,2,6,'Organic Synthesis');
708     INSERT INTO infotype VALUES (69,2,6,'Physical Property Data');
709     INSERT INTO infotype VALUES (70,2,8,'Federal Law - Administrative Law');
710     INSERT INTO infotype VALUES (71,2,8,'Minnesota Law - Constitution, Statutes and Codes');
711     INSERT INTO infotype VALUES (72,2,8,'Courts');
712     INSERT INTO infotype VALUES (73,2,8,'Attorneys and Law Firms');
713     INSERT INTO infotype VALUES (74,2,8,'Minnesota Law - Administrative Law');
714     INSERT INTO infotype VALUES (75,2,8,'Minnesota Law - Case Law');
715     INSERT INTO infotype VALUES (76,2,8,'Law Schools');
716     INSERT INTO infotype VALUES (77,2,8,'Federal Law - Case Law - U.S. Supreme Court');
717     INSERT INTO infotype VALUES (78,2,8,'Federal Law - Case Law - U.S. Court of Appeals');
718     INSERT INTO infotype VALUES (79,2,8,'Federal Law - Case Law - U.S. District Courts');
719     INSERT INTO infotype VALUES (80,2,8,'Laws and Legislation');
720     INSERT INTO infotype VALUES (81,2,8,'Official Journal of Legislative Activity');
721     INSERT INTO infotype VALUES (82,2,8,'Unofficial Journal of Legislative Activity');
722     INSERT INTO infotype VALUES (83,2,8,'Legislative Debates');
723     INSERT INTO infotype VALUES (84,2,8,'Federal Law - Constitution, Statutes and Codes');
724     INSERT INTO infotype VALUES (85,2,2,'Country Studies');
725     INSERT INTO infotype VALUES (130,11,2,'Electronic Texts');
726     INSERT INTO infotype VALUES (87,11,2,'Official Agency and Organization Web Sites');
727     INSERT INTO infotype VALUES (88,11,2,'Internet Directory');
728     INSERT INTO infotype VALUES (105,1,6,'Astronomical Objects');
729     INSERT INTO infotype VALUES (124,10,2,'Writing Guides');
730     INSERT INTO infotype VALUES (125,2,6,'Safety Information');
731     INSERT INTO infotype VALUES (126,6,2,'Electronic Journal Collections');
732     INSERT INTO infotype VALUES (127,8,2,'Image Resources');
733     INSERT INTO infotype VALUES (128,2,2,'Conferences and Proceedings');
734     INSERT INTO infotype VALUES (129,10,2,'Style Manuals');
735     INSERT INTO infotype VALUES (131,2,2,'Standards');
736     INSERT INTO infotype VALUES (132,2,6,'Analytical Techniques');
737     INSERT INTO infotype VALUES (133,2,6,'Chemical Prices');
738     INSERT INTO infotype VALUES (134,2,2,'Treatises');
739     INSERT INTO infotype VALUES (135,2,2,'Rankings');
740     INSERT INTO infotype VALUES (136,2,2,'Technical Reports');
741     INSERT INTO infotype VALUES (137,5,2,'Historical Documents');
742     INSERT INTO infotype VALUES (138,13,2,'Web Sites');
743     INSERT INTO infotype VALUES (139,5,2,'Government Documents');
744     INSERT INTO infotype VALUES (140,5,2,'Archival Materials');
745     INSERT INTO infotype VALUES (143,2,2,'Dissertations and Theses');
746     INSERT INTO infotype VALUES (142,2,2,'Guides');
747     INSERT INTO infotype VALUES (147,13,2,'Library Web Sites');
748     INSERT INTO infotype VALUES (148,13,2,'Campus web site');
749     INSERT INTO infotype VALUES (149,6,2,'Electronic Journal Titles');
750    
751 dpavlin 80
752 dpavlin 34 --
753 dpavlin 80 -- TOC entry 2 (OID 6065592)
754     -- Name: vendor; Type: TABLE; Schema: public; Owner: dpavlin
755     --
756    
757     CREATE TABLE vendor (
758     vendor_id serial NOT NULL,
759     vendor character varying(255),
760     vendor_descr text,
761     vendor_message text,
762     vendor_status character(1)
763     );
764    
765    
766     --
767     -- Data for TOC entry 5 (OID 6065592)
768     -- Name: vendor; Type: TABLE DATA; Schema: public; Owner: dpavlin
769     --
770    
771     COPY vendor (vendor_id, vendor, vendor_descr, vendor_message, vendor_status) FROM stdin;
772     1 N/A \N \N \N
773     \.
774    
775    
776     --
777     -- TOC entry 4 (OID 6065598)
778     -- Name: vendor_pkey; Type: CONSTRAINT; Schema: public; Owner: dpavlin
779     --
780    
781     ALTER TABLE ONLY vendor
782     ADD CONSTRAINT vendor_pkey PRIMARY KEY (vendor_id);
783    
784    
785     --
786     -- TOC entry 3 (OID 6065590)
787     -- Name: vendor_vendor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dpavlin
788     --
789    
790     SELECT pg_catalog.setval('vendor_vendor_id_seq', 1, true);
791    
792    
793    
794     --
795 dpavlin 34 -- Table structure for table `resource`
796     --
797    
798    
799    
800     --
801     -- Sequences for table RESOURCE
802     --
803    
804     CREATE SEQUENCE resource_resource_id_seq;
805    
806     CREATE TABLE resource (
807     resource_id INT4 DEFAULT nextval('resource_resource_id_seq'),
808     date_created TIMESTAMP DEFAULT NULL,
809     date_modified TIMESTAMP DEFAULT NULL,
810     account_created varchar(20) DEFAULT NULL,
811     account_modified varchar(20) DEFAULT NULL,
812     title varchar(255) DEFAULT NULL,
813     other_title text,
814     author varchar(125) DEFAULT NULL,
815     publisher varchar(255) DEFAULT NULL,
816     pub_date varchar(255) DEFAULT NULL,
817     edition varchar(25) DEFAULT NULL,
818     cat_num varchar(50) DEFAULT NULL,
819     call_no text,
820     coverage_detail varchar(255) DEFAULT NULL,
821     sources_indexed varchar(100) DEFAULT NULL,
822     url text,
823     visited varchar(25) DEFAULT NULL,
824     annotation text,
825 dpavlin 43 location_id INT4 references location(location_id) on delete cascade on update cascade,
826     infotype_id INT4 references infotype(infotype_id) on delete cascade on update cascade,
827 dpavlin 80 vendor_id INT4 references vendor(vendor_id) on delete cascade on update cascade,
828     guide_url text,
829     resource_message text,
830     resource_status char(1) default NULL,
831 dpavlin 34 PRIMARY KEY (resource_id)
832    
833     );
834    
835     --
836     -- Dumping data for table `resource`
837     --
838    
839 dpavlin 80 INSERT INTO resource VALUES (1,'2003-09-16 15:54:54','2004-03-02 16:15:20','admin','admin','Google','','','','','','','','','','http://www.google.com/',NULL,'Pretraživaè weba',NULL,41,1);
840     INSERT INTO resource VALUES (2,'2003-09-16 16:10:13','2003-09-16 16:10:13','admin',NULL,'SETI@Home','','','','','','','','','','http://setiathome.berkeley.edu/',NULL,'SETI@home is a scientific experiment that uses Internet-connected computers in the Search for Extraterrestrial Intelligence (SETI). You can participate by running a free program that downloads and analyzes radio telescope data.',NULL,138,1);
841     INSERT INTO resource VALUES (3,'2003-09-16 16:13:11','2003-09-24 09:35:24','admin','jtest','SETI Institute','','','','','','','','','','http://www.seti-inst.edu/',NULL,'The mission of the SETI Institute is to explore, understand and explain the origin, nature and prevalence of life in the universe.',NULL,87,1);
842     INSERT INTO resource VALUES (4,'2003-09-17 09:35:43','2003-09-17 09:35:43','admin',NULL,'Harvard\'s SETI Project','','','','','','','','','','http://seti.harvard.edu/seti/',NULL,'Project home page for Harvard\'s SETI programs.',NULL,138,1);
843     INSERT INTO resource VALUES (11,'2003-10-01 09:35:17','2003-10-01 09:35:17','admin',NULL,'Sky & Telescope\'s SETI Page','','','','','','','','','','http://skyandtelescope.com/resources/SETI/',NULL,'Sky & Telescope magazine\'s collection of resources on SETI.',NULL,138,1);
844     INSERT INTO resource VALUES (12,'2003-10-01 09:45:28','2003-10-01 11:54:27','admin','admin','The SETI League','','','','','','','','','','http://seti1.setileague.org/index.html',NULL,'Non-profit organization, primarily of amateur radio astronomers interested in coordinating a private effort (Project Argus) of small radio telescopes in a SETI search.',NULL,24,1);
845     INSERT INTO resource VALUES (13,'2003-10-01 09:53:27','2003-10-06 14:48:18','admin','admin','Arecibo Observatory','','','','','','','','','','http://www.naic.edu/',NULL,'The radiotelescope based in Puerto Rico responsible for the feed to SETI@Home.',NULL,87,1);
846     INSERT INTO resource VALUES (14,'2003-10-01 09:58:52','2004-01-27 14:35:52','admin','admin','Astrobiology Web','','','','','','','','','','http://www.astrobiology.com/',NULL,'General gateway site to many resources and articles on astrobiology.',NULL,40,1);
847     INSERT INTO resource VALUES (15,'2004-02-16 15:10:51','2004-02-16 15:10:51','admin',NULL,'E-LIS','E-Prints in Library and Information Science','','','','','','','','','http://eprints.rclis.org/',NULL,'',NULL,130,1);
848     INSERT INTO resource VALUES (16,'2004-02-17 00:41:39','2004-02-27 21:32:33','admin','admin','Classics in the History of psychology','','','','','','','','','','http://psychclassics.yorku.ca/',NULL,'zbirka klasiènih tekstova iz psihologije',NULL,130,1);
849     INSERT INTO resource VALUES (17,'2004-03-02 15:37:04','2004-03-02 15:37:15','admin','admin','Katalog knjižnica FF-a','','','FF','2001','','','','','','http://knjiznice.ffzg.hr/webpac/',NULL,'Skupni katalog knjižnica FF-a',NULL,24,1);
850     INSERT INTO resource VALUES (18,'2004-03-02 15:53:32','2004-03-02 15:53:57','admin','admin','Skupni katalog knjižnica tehnike','','','','','','','','','','http://mjesec.ffzg.hr/webpac-tehnika/',NULL,'',NULL,24,1);
851     INSERT INTO resource VALUES (19,'2004-03-02 16:00:19','2004-03-02 16:01:46','admin','admin','Kluwer èasopisi','','','Kluwer','','','','','','','http://gateway.ovid.com/autologin.html',NULL,'',NULL,126,1);
852     INSERT INTO resource VALUES (20,'2004-03-03 20:53:58','2004-03-03 20:54:41','admin','admin','Centar za online baze podataka','','','','','','','','','','http://nippur.irb.hr/ovid/',NULL,'Centar za online baze podataka je projekt Ministarstva znanosti i tehnologije RH kojim ono osigurava mre¾ni pristup komercijalnim bazama podataka za èlanove znanstvene i istra¾ivaèke zajednice RH.',NULL,18,1);
853 dpavlin 34
854     --
855     -- Table structure for table `element`
856     --
857    
858    
859    
860     --
861     -- Sequences for table ELEMENT
862     --
863    
864     CREATE SEQUENCE element_element_id_seq;
865    
866     CREATE TABLE element (
867     element_id INT4 DEFAULT nextval('element_element_id_seq'),
868 dpavlin 43 page_id INT4 references page(page_id) on delete cascade on update cascade,
869     parent_id INT4, --- XXX references element(element_id) on delete cascade on update cascade,
870     resource_id INT4 references resource(resource_id) on delete cascade on update cascade,
871     location_id INT4 references location(location_id) on delete cascade on update cascade,
872     service_id INT4 references service(service_id) on delete cascade on update cascade,
873     staff_id INT4 references staff(staff_id) on delete cascade on update cascade,
874     subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
875 dpavlin 34 label varchar(200) DEFAULT NULL,
876     label_url varchar(200) DEFAULT NULL,
877     element_descr text,
878     element_size INT2 DEFAULT NULL,
879     element_order INT2 DEFAULT NULL,
880     indent_level INT2 DEFAULT NULL,
881     PRIMARY KEY (element_id)
882    
883     );
884    
885     --
886     -- Dumping data for table `element`
887     --
888    
889     INSERT INTO element VALUES (21,4,15,14,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,9,1);
890     INSERT INTO element VALUES (22,4,15,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,10,1);
891     INSERT INTO element VALUES (20,4,15,13,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,7,1);
892     INSERT INTO element VALUES (15,4,0,NULL,NULL,NULL,NULL,NULL,'Harested Links from the Astrobiology RQS Page','','<i>Note</i> -- these aren\'t actually additional resources. They are duplicated here to demonstrate PageScribe.',3,6,0);
893     INSERT INTO element VALUES (23,4,15,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,11,1);
894     INSERT INTO element VALUES (25,4,15,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,12,1);
895     INSERT INTO element VALUES (28,15,0,NULL,NULL,NULL,NULL,NULL,'Library Resources','','',1,8,0);
896     INSERT INTO element VALUES (29,15,28,NULL,58,NULL,NULL,NULL,NULL,NULL,'\r\n',NULL,9,1);
897     INSERT INTO element VALUES (30,15,28,NULL,55,NULL,NULL,NULL,NULL,NULL,NULL,5,10,1);
898     INSERT INTO element VALUES (31,15,0,NULL,NULL,NULL,NULL,NULL,'Astrobiology','','',1,1,0);
899     INSERT INTO element VALUES (32,15,31,13,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,1);
900     INSERT INTO element VALUES (33,15,31,14,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,1);
901     INSERT INTO element VALUES (34,15,31,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,1);
902     INSERT INTO element VALUES (35,15,31,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,5,1);
903     INSERT INTO element VALUES (36,15,31,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,6,1);
904     INSERT INTO element VALUES (37,15,31,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,7,1);
905     INSERT INTO element VALUES (49,4,0,2,NULL,NULL,NULL,NULL,'','','',0,5,0);
906     INSERT INTO element VALUES (50,17,0,NULL,NULL,NULL,NULL,NULL,'radno vrijeme','http://www.ffzg.hr/psiho/knjiznica/','pon, uto 12 do 19',0,1,0);
907     INSERT INTO element VALUES (51,4,20,NULL,NULL,NULL,NULL,NULL,'to je tekst','http://bla..','neki tekst',NULL,8,2);
908     INSERT INTO element VALUES (52,4,0,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,4,0);
909     INSERT INTO element VALUES (57,18,0,NULL,NULL,NULL,NULL,NULL,'Harested Links from the Astrobiology RQS Page','','<i>Note</i> -- these aren\'t actually additional resources. They are duplicated here to demonstrate PageScribe.',3,9,0);
910     INSERT INTO element VALUES (54,4,0,16,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0);
911     INSERT INTO element VALUES (55,4,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0);
912     INSERT INTO element VALUES (56,4,0,NULL,NULL,NULL,NULL,6,NULL,NULL,NULL,0,1,0);
913     INSERT INTO element VALUES (58,18,57,13,NULL,NULL,NULL,NULL,'','','',NULL,10,1);
914     INSERT INTO element VALUES (59,18,57,14,NULL,NULL,NULL,NULL,'','','',NULL,12,1);
915     INSERT INTO element VALUES (60,18,57,4,NULL,NULL,NULL,NULL,'','','',NULL,13,1);
916     INSERT INTO element VALUES (61,18,57,3,NULL,NULL,NULL,NULL,'','','',NULL,14,1);
917     INSERT INTO element VALUES (62,18,57,11,NULL,NULL,NULL,NULL,'','','',NULL,15,1);
918     INSERT INTO element VALUES (63,18,0,2,NULL,NULL,NULL,NULL,'','','',NULL,8,0);
919     INSERT INTO element VALUES (64,18,58,NULL,NULL,NULL,NULL,NULL,'to je tekst','http://bla..','neki tekst',NULL,11,2);
920     INSERT INTO element VALUES (65,18,0,20,NULL,NULL,NULL,NULL,'','','',NULL,7,0);
921     INSERT INTO element VALUES (66,18,0,16,NULL,NULL,NULL,NULL,'','','',NULL,5,0);
922     INSERT INTO element VALUES (67,18,0,1,NULL,NULL,NULL,NULL,'','','',NULL,6,0);
923     INSERT INTO element VALUES (68,18,0,NULL,NULL,NULL,NULL,6,'','','',NULL,4,0);
924     INSERT INTO element VALUES (70,18,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0);
925     INSERT INTO element VALUES (71,18,0,19,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0);
926     INSERT INTO element VALUES (72,18,0,18,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,0);
927     INSERT INTO element VALUES (73,19,0,NULL,NULL,NULL,NULL,NULL,'Postavljena demo verzija LibData rješenja','http://libdata.sf.net/','LibData,portal namjenjen specifi&#269;no knjižni&#269;arima instaliran je probno na adresi http://libdata.knjiznice.ffzg.hr/',0,1,0);
928     INSERT INTO element VALUES (74,19,0,NULL,NULL,NULL,NULL,NULL,'Sustav znanstevnih informacija, prijedlog za web site','http://mjesec.ffzg.hr/~mglavica/szi-web2/','SZI humanistika je dobio prijedlog protopipa za novi web. Ve&#263;inom se radilo na organizaciji sadržaja, jer &#263;e sam design biti povjeren dizajerima.',0,2,0);
929    
930     --
931     -- Table structure for table `feature`
932     --
933    
934    
935    
936     --
937     -- Sequences for table FEATURE
938     --
939    
940     CREATE SEQUENCE feature_feature_id_seq;
941    
942     CREATE TABLE feature (
943     feature_id INT4 DEFAULT nextval('feature_feature_id_seq'),
944     feature varchar(50) DEFAULT NULL,
945     image_path varchar(100) DEFAULT NULL,
946     image_alt varchar(100) DEFAULT NULL,
947     PRIMARY KEY (feature_id)
948    
949     );
950    
951     --
952     -- Dumping data for table `feature`
953     --
954    
955     INSERT INTO feature VALUES (1,'(N/A)',NULL,NULL);
956     INSERT INTO feature VALUES (2,'CD-ROM','images/cd.gif','On CD-ROM Format');
957     INSERT INTO feature VALUES (3,'Full Text','images/fulltext.gif','Available in Full Text');
958     INSERT INTO feature VALUES (5,'Restricted','images/lock.gif','Authentication Required');
959    
960     --
961     -- Table structure for table `libunit`
962     --
963    
964    
965    
966     --
967     -- Sequences for table LIBUNIT
968     --
969    
970     CREATE SEQUENCE libunit_libunit_id_seq;
971    
972     CREATE TABLE libunit (
973     libunit_id INT4 DEFAULT nextval('libunit_libunit_id_seq'),
974     libunit varchar(100) DEFAULT NULL,
975     libunit_abbrev varchar(25) DEFAULT NULL,
976 dpavlin 43 head_staff_id INT4 references staff(staff_id) on delete cascade on update cascade,
977 dpavlin 34 PRIMARY KEY (libunit_id)
978    
979     );
980    
981     --
982     -- Dumping data for table `libunit`
983     --
984    
985     INSERT INTO libunit VALUES (1,'(N/A)','(N/A)',NULL);
986    
987     --
988     -- Table structure for table `libunit_staff`
989     --
990    
991     CREATE TABLE libunit_staff (
992 dpavlin 43 libunit_id INT4 references libunit(libunit_id) on delete cascade on update cascade,
993     staff_id INT4 references staff(staff_id) on delete cascade on update cascade,
994 dpavlin 34 PRIMARY KEY (libunit_id,staff_id)
995    
996     );
997    
998     --
999     -- Dumping data for table `libunit_staff`
1000     --
1001    
1002     --
1003     -- Table structure for table `page_staff`
1004     --
1005    
1006     CREATE TABLE page_staff (
1007 dpavlin 43 page_id INT4 references page(page_id) on delete cascade on update cascade,
1008     staff_id INT4 references staff(staff_id) on delete cascade on update cascade,
1009 dpavlin 34 PRIMARY KEY (page_id,staff_id)
1010    
1011     );
1012    
1013     --
1014     -- Dumping data for table `page_staff`
1015     --
1016    
1017     INSERT INTO page_staff VALUES (19,4);
1018    
1019     --
1020     -- Table structure for table `pastebuffer`
1021     --
1022    
1023    
1024    
1025     --
1026     -- Sequences for table PASTEBUFFER
1027     --
1028    
1029     CREATE SEQUENCE pastebuffer_pastebuffer_id_s;
1030    
1031     CREATE TABLE pastebuffer (
1032     pastebuffer_id INT4 DEFAULT nextval('pastebuffer_pastebuffer_id_s'),
1033 dpavlin 43 paste_staff_id INT4 references staff(staff_id) on delete cascade on update cascade,
1034     parent_id INT4 DEFAULT NULL, -- XXX references what? on delete cascade on update cascade
1035     resource_id INT4 references resource(resource_id) on delete cascade on update cascade,
1036     location_id INT4 references location(location_id) on delete cascade on update cascade,
1037     service_id INT4 references service(service_id) on delete cascade on update cascade,
1038     staff_id INT4 references staff(staff_id) on delete cascade on update cascade,
1039     subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
1040 dpavlin 34 label varchar(200) DEFAULT NULL,
1041     label_url varchar(200) DEFAULT NULL,
1042     element_descr text,
1043     element_size INT2 DEFAULT NULL,
1044     element_order INT2 DEFAULT NULL,
1045     indent_level INT2 DEFAULT NULL,
1046     PRIMARY KEY (pastebuffer_id)
1047    
1048     );
1049    
1050     --
1051     -- Dumping data for table `pastebuffer`
1052     --
1053    
1054    
1055     --
1056     -- Table structure for table `res_feature`
1057     --
1058    
1059     CREATE TABLE res_feature (
1060 dpavlin 43 resource_id INT4 references resource(resource_id) on delete cascade on update cascade,
1061     feature_id INT4 references feature(feature_id) on delete cascade on update cascade,
1062 dpavlin 34 PRIMARY KEY (resource_id,feature_id)
1063    
1064     );
1065    
1066     --
1067     -- Dumping data for table `res_feature`
1068     --
1069    
1070     INSERT INTO res_feature VALUES (11,3);
1071     INSERT INTO res_feature VALUES (14,2);
1072     INSERT INTO res_feature VALUES (14,5);
1073     INSERT INTO res_feature VALUES (15,3);
1074     INSERT INTO res_feature VALUES (16,3);
1075     INSERT INTO res_feature VALUES (19,3);
1076     INSERT INTO res_feature VALUES (19,5);
1077     INSERT INTO res_feature VALUES (20,5);
1078    
1079     --
1080     -- Table structure for table `res_loc`
1081     --
1082    
1083     CREATE TABLE res_loc (
1084 dpavlin 43 resource_id INT4 references resource(resource_id) on delete cascade on update cascade,
1085     location_id INT4 references location(location_id) on delete cascade on update cascade,
1086 dpavlin 34 PRIMARY KEY (resource_id,location_id)
1087    
1088     );
1089    
1090     --
1091     -- Dumping data for table `res_loc`
1092     --
1093    
1094     INSERT INTO res_loc VALUES (2,55);
1095     INSERT INTO res_loc VALUES (3,55);
1096     INSERT INTO res_loc VALUES (11,55);
1097     INSERT INTO res_loc VALUES (12,55);
1098     INSERT INTO res_loc VALUES (13,55);
1099     INSERT INTO res_loc VALUES (15,55);
1100     INSERT INTO res_loc VALUES (16,55);
1101     INSERT INTO res_loc VALUES (18,55);
1102     INSERT INTO res_loc VALUES (19,55);
1103    
1104     --
1105     -- Table structure for table `res_mastersubject`
1106     --
1107    
1108     CREATE TABLE res_mastersubject (
1109 dpavlin 43 resource_id INT4 references resource(resource_id) on delete cascade on update cascade,
1110     mastersubject_id INT4 references mastersubject(mastersubject_id) on delete cascade on update cascade,
1111 dpavlin 34 PRIMARY KEY (resource_id,mastersubject_id)
1112    
1113     );
1114    
1115     --
1116     -- Dumping data for table `res_mastersubject`
1117     --
1118    
1119     INSERT INTO res_mastersubject VALUES (1,10);
1120     INSERT INTO res_mastersubject VALUES (2,6);
1121     INSERT INTO res_mastersubject VALUES (3,6);
1122     INSERT INTO res_mastersubject VALUES (4,6);
1123     INSERT INTO res_mastersubject VALUES (11,6);
1124     INSERT INTO res_mastersubject VALUES (12,6);
1125     INSERT INTO res_mastersubject VALUES (13,6);
1126     INSERT INTO res_mastersubject VALUES (14,6);
1127     INSERT INTO res_mastersubject VALUES (15,9);
1128     INSERT INTO res_mastersubject VALUES (16,9);
1129     INSERT INTO res_mastersubject VALUES (17,4);
1130     INSERT INTO res_mastersubject VALUES (18,12);
1131     INSERT INTO res_mastersubject VALUES (19,10);
1132     INSERT INTO res_mastersubject VALUES (20,10);
1133    
1134     --
1135     -- Table structure for table `res_sub_infotype`
1136     --
1137    
1138     CREATE TABLE res_sub_infotype (
1139 dpavlin 43 resource_id INT4 references resource(resource_id) on delete cascade on update cascade,
1140     subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
1141     infotype_id INT4 references infotype(infotype_id) on delete cascade on update cascade,
1142 dpavlin 34 highlighted char(1) DEFAULT NULL,
1143     description text,
1144 dpavlin 43 masterinfotype_id INT4 references masterinfotype(masterinfotype_id) on delete cascade on update cascade
1145 dpavlin 34 );
1146    
1147     --
1148     -- Dumping data for table `res_sub_infotype`
1149     --
1150    
1151     INSERT INTO res_sub_infotype VALUES (2,2,138,'1','',13);
1152     INSERT INTO res_sub_infotype VALUES (4,2,138,'0',NULL,13);
1153     INSERT INTO res_sub_infotype VALUES (3,2,87,'0','',11);
1154     INSERT INTO res_sub_infotype VALUES (11,2,138,'0',NULL,13);
1155     INSERT INTO res_sub_infotype VALUES (13,2,87,'0',NULL,11);
1156     INSERT INTO res_sub_infotype VALUES (14,2,40,'0','',11);
1157     INSERT INTO res_sub_infotype VALUES (16,6,130,'1','klasici u psihologiji',11);
1158     INSERT INTO res_sub_infotype VALUES (1,6,41,'0',NULL,11);
1159     INSERT INTO res_sub_infotype VALUES (18,7,24,'0',NULL,4);
1160     INSERT INTO res_sub_infotype VALUES (1,7,41,'0',NULL,11);
1161     INSERT INTO res_sub_infotype VALUES (19,7,126,'0',NULL,6);
1162     INSERT INTO res_sub_infotype VALUES (1,2,18,'0',NULL,3);
1163     INSERT INTO res_sub_infotype VALUES (20,6,18,'0',NULL,3);
1164    
1165     --
1166     -- Table structure for table `serv_loc`
1167     --
1168    
1169     CREATE TABLE serv_loc (
1170     service_id INT4 NOT NULL DEFAULT '0',
1171 dpavlin 43 location_id INT4 references location(location_id) on delete cascade on update cascade,
1172 dpavlin 34 allloc char(1) DEFAULT NULL,
1173     PRIMARY KEY (service_id,location_id)
1174    
1175     );
1176    
1177     --
1178     -- Dumping data for table `serv_loc`
1179     --
1180    
1181    
1182     --
1183     -- Table structure for table `serv_servtype`
1184     --
1185    
1186     CREATE TABLE serv_servtype (
1187 dpavlin 43 service_id INT4 references service(service_id) on delete cascade on update cascade,
1188     servicetype_id INT4 references servicetype(servicetype_id) on delete cascade on update cascade,
1189 dpavlin 34 PRIMARY KEY (service_id,servicetype_id)
1190    
1191     );
1192    
1193     --
1194     -- Dumping data for table `serv_servtype`
1195     --
1196    
1197    
1198     --
1199     -- Table structure for table `sub_coursesub`
1200     --
1201    
1202     CREATE TABLE sub_coursesub (
1203 dpavlin 43 subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
1204     coursesub_id INT4 references coursesub(coursesub_id) on delete cascade on update cascade,
1205 dpavlin 34 PRIMARY KEY (subject_id,coursesub_id)
1206    
1207     );
1208    
1209     --
1210     -- Dumping data for table `sub_coursesub`
1211     --
1212    
1213     INSERT INTO sub_coursesub VALUES (6,555);
1214    
1215     --
1216     -- Table structure for table `sub_loc`
1217     --
1218    
1219     CREATE TABLE sub_loc (
1220 dpavlin 43 subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
1221     location_id INT4 references location(location_id) on delete cascade on update cascade,
1222 dpavlin 34 PRIMARY KEY (subject_id,location_id)
1223    
1224     );
1225    
1226     --
1227     -- Dumping data for table `sub_loc`
1228     --
1229    
1230     INSERT INTO sub_loc VALUES (2,55);
1231    
1232     --
1233     -- Table structure for table `sub_mastersubject`
1234     --
1235    
1236     CREATE TABLE sub_mastersubject (
1237 dpavlin 43 subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
1238     mastersubject_id INT4 references mastersubject(mastersubject_id) on delete cascade on update cascade,
1239 dpavlin 34 PRIMARY KEY (subject_id,mastersubject_id)
1240    
1241     );
1242    
1243     --
1244     -- Dumping data for table `sub_mastersubject`
1245     --
1246    
1247     INSERT INTO sub_mastersubject VALUES (2,6);
1248     INSERT INTO sub_mastersubject VALUES (6,9);
1249    
1250     --
1251     -- Table structure for table `sub_othersub`
1252     --
1253    
1254     CREATE TABLE sub_othersub (
1255 dpavlin 43 subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
1256 dpavlin 34 othersub_id INT4 NOT NULL DEFAULT '0', -- XXX subject or mastersubject?
1257     PRIMARY KEY (subject_id,othersub_id)
1258    
1259     );
1260    
1261     --
1262     -- Dumping data for table `sub_othersub`
1263     --
1264    
1265    
1266     --
1267     -- Table structure for table `sub_page`
1268     --
1269    
1270     CREATE TABLE sub_page (
1271 dpavlin 43 subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
1272     page_id INT4 references page(page_id) on delete cascade on update cascade,
1273 dpavlin 34 PRIMARY KEY (subject_id,page_id)
1274    
1275     );
1276    
1277     --
1278     -- Dumping data for table `sub_page`
1279     --
1280    
1281    
1282     --
1283     -- Table structure for table `sub_staff`
1284     --
1285    
1286     CREATE TABLE sub_staff (
1287 dpavlin 43 subject_id INT4 references subject(subject_id) on delete cascade on update cascade,
1288     staff_id INT4 references staff(staff_id) on delete cascade on update cascade,
1289 dpavlin 34 PRIMARY KEY (subject_id,staff_id)
1290    
1291     );
1292    
1293     --
1294     -- Dumping data for table `sub_staff`
1295     --
1296    
1297     INSERT INTO sub_staff VALUES (2,2);
1298     INSERT INTO sub_staff VALUES (6,2);
1299     INSERT INTO sub_staff VALUES (6,3);
1300     INSERT INTO sub_staff VALUES (7,2);
1301    
1302    
1303     --
1304     -- Sequences for table PAGE
1305     --
1306    
1307     SELECT SETVAL('page_page_id_seq',(select case when max(page_id)>0 then max(page_id)+1 else 1 end from page));
1308    
1309     --
1310     -- Sequences for table INFOTYPE
1311     --
1312    
1313     SELECT SETVAL('infotype_infotype_id_seq',(select case when max(infotype_id)>0 then max(infotype_id)+1 else 1 end from infotype));
1314    
1315     --
1316     -- Sequences for table TERM
1317     --
1318    
1319     SELECT SETVAL('term_term_id_seq',(select case when max(term_id)>0 then max(term_id)+1 else 1 end from term));
1320    
1321     --
1322     -- Sequences for table FEATURE
1323     --
1324    
1325     SELECT SETVAL('feature_feature_id_seq',(select case when max(feature_id)>0 then max(feature_id)+1 else 1 end from feature));
1326    
1327     --
1328     -- Sequences for table STAFFTITLE
1329     --
1330    
1331     SELECT SETVAL('stafftitle_stafftitle_id_seq',(select case when max(stafftitle_id)>0 then max(stafftitle_id)+1 else 1 end from stafftitle));
1332    
1333     --
1334     -- Sequences for table LIBUNIT
1335     --
1336    
1337     SELECT SETVAL('libunit_libunit_id_seq',(select case when max(libunit_id)>0 then max(libunit_id)+1 else 1 end from libunit));
1338    
1339     --
1340     -- Sequences for table MASTERINFOTYPE
1341     --
1342    
1343     SELECT SETVAL('masterinfotype_masterinfotyp',(select case when max(masterinfotype_id)>0 then max(masterinfotype_id)+1 else 1 end from masterinfotype));
1344    
1345     --
1346     -- Sequences for table SERVICETYPE
1347     --
1348    
1349     SELECT SETVAL('servicetype_servicetype_id_s',(select case when max(servicetype_id)>0 then max(servicetype_id)+1 else 1 end from servicetype));
1350    
1351     --
1352     -- Sequences for table MASTERSUBJECT
1353     --
1354    
1355     SELECT SETVAL('mastersubject_mastersubject_',(select case when max(mastersubject_id)>0 then max(mastersubject_id)+1 else 1 end from mastersubject));
1356    
1357     --
1358     -- Sequences for table COURSE
1359     --
1360    
1361     SELECT SETVAL('course_course_id_seq',(select case when max(course_id)>0 then max(course_id)+1 else 1 end from course));
1362    
1363     --
1364     -- Sequences for table COURSESUB
1365     --
1366    
1367     SELECT SETVAL('coursesub_coursesub_id_seq',(select case when max(coursesub_id)>0 then max(coursesub_id)+1 else 1 end from coursesub));
1368    
1369     --
1370     -- Sequences for table LOCATION
1371     --
1372    
1373     SELECT SETVAL('location_location_id_seq',(select case when max(location_id)>0 then max(location_id)+1 else 1 end from location));
1374    
1375     --
1376     -- Sequences for table SUBJECT
1377     --
1378    
1379     SELECT SETVAL('subject_subject_id_seq',(select case when max(subject_id)>0 then max(subject_id)+1 else 1 end from subject));
1380    
1381     --
1382     -- Sequences for table ACCESS
1383     --
1384    
1385     SELECT SETVAL('access_access_id_seq',(select case when max(access_id)>0 then max(access_id)+1 else 1 end from access));
1386    
1387     --
1388     -- Sequences for table STYLE
1389     --
1390    
1391     SELECT SETVAL('style_style_id_seq',(select case when max(style_id)>0 then max(style_id)+1 else 1 end from style));
1392    
1393     --
1394     -- Sequences for table STAFF
1395     --
1396    
1397     SELECT SETVAL('staff_staff_id_seq',(select case when max(staff_id)>0 then max(staff_id)+1 else 1 end from staff));
1398    
1399     --
1400     -- Sequences for table COURSE_PERSONNEL
1401     --
1402    
1403     SELECT SETVAL('course_personnel_personnel_i',(select case when max(personnel_id)>0 then max(personnel_id)+1 else 1 end from course_personnel));
1404    
1405     --
1406     -- Sequences for table FACULTY
1407     --
1408    
1409     SELECT SETVAL('faculty_faculty_id_seq',(select case when max(faculty_id)>0 then max(faculty_id)+1 else 1 end from faculty));
1410    
1411     --
1412     -- Sequences for table SERVICE
1413     --
1414    
1415     SELECT SETVAL('service_service_id_seq',(select case when max(service_id)>0 then max(service_id)+1 else 1 end from service));
1416    
1417     --
1418     -- Sequences for table ELEMENT
1419     --
1420    
1421     SELECT SETVAL('element_element_id_seq',(select case when max(element_id)>0 then max(element_id)+1 else 1 end from element));
1422    
1423     --
1424     -- Sequences for table RESOURCE
1425     --
1426    
1427     SELECT SETVAL('resource_resource_id_seq',(select case when max(resource_id)>0 then max(resource_id)+1 else 1 end from resource));
1428    
1429     --
1430     -- Sequences for table PASTEBUFFER
1431     --
1432    
1433     SELECT SETVAL('pastebuffer_pastebuffer_id_s',(select case when max(pastebuffer_id)>0 then max(pastebuffer_id)+1 else 1 end from pastebuffer));
1434    
1435     --
1436     -- Sequences for table CAMPUS
1437     --
1438    
1439     SELECT SETVAL('campus_campus_id_seq',(select case when max(campus_id)>0 then max(campus_id)+1 else 1 end from campus));
1440    
1441     --
1442     -- Sequences for table PAGETYPE
1443     --
1444    
1445     SELECT SETVAL('pagetype_pagetype_id_seq',(select case when max(pagetype_id)>0 then max(pagetype_id)+1 else 1 end from pagetype));
1446    
1447     COMMIT;
1448 dpavlin 80

  ViewVC Help
Powered by ViewVC 1.1.26