/[registar]/shema.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /shema.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Tue Jun 19 10:10:48 2001 UTC (17 years, 11 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +10 -2 lines
podjela atk i inn u dvije tablice (različiti šifarnici!!!)

1
2 DROP TABLE lijekovi;
3 DROP TABLE nacin_izdavanja;
4 DROP TABLE list_fond;
5 DROP TABLE trudnoca;
6 DROP TABLE dojencad;
7 DROP TABLE vozac;
8 DROP TABLE droga;
9 DROP TABLE atk;
10 DROP TABLE inn;
11 DROP TABLE zupanije;
12 DROP TABLE proizvodjaci;
13
14
15 CREATE TABLE lijekovi (
16 sifra INTEGER NOT NULL PRIMARY KEY,
17 naziv CHAR VARYING(100) NOT NULL,
18 sif_atk CHAR VARYING(20),
19 sif_inn CHAR VARYING(20),
20 sif_proizvodjac INTEGER,
21 pakovanje TEXT NOT NULL,
22 sastav_1 TEXT NOT NULL,
23 sastav_2 TEXT NOT NULL,
24 sif_nacin_izdavanja CHAR VARYING(5),
25 sif_list_fond CHAR VARYING(5),
26 sif_trudnoca CHAR VARYING(5),
27 sif_dojencad CHAR VARYING(5),
28 sif_vozac CHAR VARYING(5),
29 sif_droga CHAR VARYING(5),
30 cijena CHAR VARYING(16) NOT NULL,
31 sif_med INTEGER NOT NULL,
32 razno TEXT,
33 glav_razno TEXT,
34 djelovanje TEXT,
35 indikacije TEXT,
36 oprez TEXT
37 );
38
39 CREATE TABLE nacin_izdavanja (
40 sifra CHAR VARYING(5) NOT NULL PRIMARY KEY,
41 opis TEXT
42 );
43
44 CREATE TABLE list_fond (
45 sifra CHAR VARYING(5) NOT NULL PRIMARY KEY,
46 opis TEXT
47 );
48
49 CREATE TABLE trudnoca (
50 sifra CHAR VARYING(5) NOT NULL PRIMARY KEY,
51 opis TEXT
52 );
53
54 CREATE TABLE dojencad (
55 sifra CHAR VARYING(5) NOT NULL PRIMARY KEY,
56 opis TEXT
57 );
58
59 CREATE TABLE vozac (
60 sifra CHAR VARYING(5) NOT NULL PRIMARY KEY,
61 opis TEXT
62 );
63
64 CREATE TABLE droga (
65 sifra CHAR VARYING(5) NOT NULL PRIMARY KEY,
66 opis TEXT
67 );
68
69 CREATE TABLE atk (
70 sifra CHAR VARYING(20) PRIMARY KEY NOT NULL,
71 naziv CHAR VARYING(100) NOT NULL,
72 razno TEXT
73 );
74
75 CREATE TABLE inn (
76 sifra CHAR VARYING(20) PRIMARY KEY NOT NULL,
77 naziv CHAR VARYING(100) NOT NULL,
78 razno TEXT
79 );
80
81
82 CREATE TABLE zupanije (
83 broj INTEGER NOT NULL,
84 naziv CHAR VARYING(30) NOT NULL,
85 centar CHAR VARYING(20) NOT NULL,
86 pos_broj CHAR VARYING(7) NOT NULL PRIMARY KEY,
87 npos_broj CHAR VARYING(7) NOT NULL,
88 spos_broj CHAR VARYING(7) NOT NULL,
89 grad CHAR VARYING(20) NOT NULL,
90 zip CHAR VARYING(10) NOT NULL
91 );
92
93 CREATE TABLE proizvodjaci (
94 sifra INTEGER NOT NULL PRIMARY KEY,
95 naziv CHAR VARYING(100) NOT NULL,
96 drzava CHAR VARYING(30) NOT NULL,
97 zastupnistvo CHAR VARYING(50) NOT NULL,
98 mjesto CHAR VARYING(30) NOT NULL,
99 zip CHAR VARYING(10) NOT NULL,
100 ulica_i_broj CHAR VARYING(50) NOT NULL,
101 razno TEXT,
102 telefon CHAR VARYING(20),
103 fax CHAR VARYING(20)
104 );
105

  ViewVC Help
Powered by ViewVC 1.1.26