All pastes #794728 Raw Edit

Stuff

public sql v1 · immutable
#794728 ·published 2007-11-23 11:41 UTC
rendered paste body
studbase=# \d persons       Tabell «public.persons»  Kolonne  |  Type   | Modifikatorer -----------+---------+--------------- fnr       | integer | not null pnr       | integer | not null firstname | text    | not null surname   | text    | not nullIndekser:    «fnrpnr» PRIMARY KEY, btree (fnr, pnr)studbase=# \d students        Tabell «public.students»   Kolonne    |  Type   | Modifikatorer --------------+---------+--------------- fnr          | integer | not null pnr          | integer | not null hionr        | integer | not null studyprogram | text    | not nullIndekser:    «students_pkey» PRIMARY KEY, btree (fnr, pnr)    «students_hionr_key» UNIQUE, btree (hionr)Fremmednøkkeltvangstrøyer (constraints):    «students_fnr_fkey» FOREIGN KEY (fnr, pnr) REFERENCES persons(fnr, pnr) ON UPDATE CASCADE ON DELETE CASCADE    «students_studyprogram_fkey» FOREIGN KEY (studyprogram) REFERENCES studyprograms(acronym) ON UPDATE CASCADE ON DELETE CASCADE