Schema
public
Owner
waveuser002
Tablespace
(default)
Descriptions
Tabel met ontheffingen per horeca-vergunning zoals ontheffingen van de sluitingstijden
Fields
PK | FK | Name | Data type | Not null | Unique | Inherited | Default | Description |
---|---|---|---|---|---|---|---|---|
|
dnkey |
serial |
|
nextval('tbhorontheffingen_dnkey_seq'::regclass) |
Primary key. |
|||
|
dnkeyhorvergunning |
integer |
|
|
|
|
Foreign key naar TbHorecavergunningen.dnkey. Deze is null indien dnkeymilinrichtingen is gevuld. |
|
|
|
dddatum |
timestamp |
|
|
|
|
Datum van ontheffing. |
|
|
dvtijd1van |
char(5) |
|
|
|
|
Tijdstip 1 vanaf. |
|
|
dvtijd1tot |
char(5) |
|
|
|
|
Tijdstip 1 tot. |
|
|
dvtijd2van |
char(5) |
|
|
|
|
Tijdstip 2 vanaf. |
|
|
dvtijd2tot |
char(5) |
|
|
|
|
Tijdstip 2 tot. |
|
|
dvnotitie |
varchar(60) |
|
|
|
|
Memoveldje. |
|
dnkeycontactadressen |
integer |
|
|
|
|
Foreign key naar TbContactadressen.dnkey Leidinggevende die op dag en tijd aanwezig is. |
|
|
dnkeymilinrichtingen |
integer |
|
|
|
|
Foreign key naar TbMilinrichtingen.dnkey. Deze is null indien dnkeyhorvergunning is gevuld. |
Foreign Keys
Name | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|
cfk_tbhoronth_keymilinr |
dnkeymilinrichtingen |
dnkey |
Cascade |
No Action |
|
Immediate |
|
|
cfk_tbhoronthef_keycont |
dnkeycontactadressen |
dnkey |
No Action |
No Action |
|
Immediate |
|
|
cfk_tbhoronthef_tbhorverg |
dnkeyhorvergunning |
dnkey |
Cascade |
No Action |
|
Immediate |
|
Checks
Name | Condition | Description |
---|---|---|
cnn_tbhoronth_keyverg |
((dnkeymilinrichtingen IS NOT NULL) AND (dnkeyhorvergunning IS NULL)) OR ((dnkeyhorvergunning IS NOT NULL) AND (dnkeymilinrichtingen IS NULL)) |
|
Indices
Name | Type | Function | Fields | Primary Key | Unique | Description |
---|---|---|---|---|---|---|
cpk_tbhorontheffingen |
btree |
|
dnkey |
|
||
idx_horonthef_dddatum |
btree |
|
dddatum |
|
|
|
idx_horonthef_keycont |
btree |
|
dnkeycontactadressen |
|
|
|
idx_horonthef_keyhorverg |
btree |
|
dnkeyhorvergunning |
|
|
|
idx_tbhoronth_keymilinr |
btree |
|
dnkeymilinrichtingen |
|
|
|
Triggers
There are no triggers for table tbhorontheffingen
Rules
There are no rules for table tbhorontheffingen
Referenced
There are no tables referenced by table tbhorontheffingen
Options
Option | Value |
---|---|
Inherited From |
|
Rows |
0 |
Pages |
0 |
System |
|
Temporary |
|
With OID |
|
Definition
CREATE TABLE public.tbhorontheffingen (
dnkey SERIAL,
dnkeyhorvergunning INTEGER,
dddatum TIMESTAMP WITHOUT TIME ZONE,
dvtijd1van CHAR(5),
dvtijd1tot CHAR(5),
dvtijd2van CHAR(5),
dvtijd2tot CHAR(5),
dvnotitie VARCHAR(60),
dnkeycontactadressen INTEGER,
dnkeymilinrichtingen INTEGER,
CONSTRAINT cpk_tbhorontheffingen PRIMARY KEY(dnkey),
CONSTRAINT cnn_tbhoronth_keyverg CHECK (((dnkeymilinrichtingen IS NOT NULL) AND (dnkeyhorvergunning IS NULL)) OR ((dnkeyhorvergunning IS NOT NULL) AND (dnkeymilinrichtingen IS NULL))),
CONSTRAINT cfk_tbhoronth_keymilinr FOREIGN KEY (dnkeymilinrichtingen)
REFERENCES public.tbmilinrichtingen(dnkey)
ON DELETE CASCADE
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT cfk_tbhoronthef_keycont FOREIGN KEY (dnkeycontactadressen)
REFERENCES public.tbcontactadressen(dnkey)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT cfk_tbhoronthef_tbhorverg FOREIGN KEY (dnkeyhorvergunning)
REFERENCES public.tbhorecavergunningen(dnkey)
ON DELETE CASCADE
ON UPDATE NO ACTION
NOT DEFERRABLE
)
WITH (oids = false);
COMMENT ON TABLE public.tbhorontheffingen
IS 'Tabel met ontheffingen per horeca-vergunning zoals ontheffingen van de sluitingstijden';
COMMENT ON COLUMN public.tbhorontheffingen.dnkey
IS 'Primary key.';
COMMENT ON COLUMN public.tbhorontheffingen.dnkeyhorvergunning
IS 'Foreign key naar TbHorecavergunningen.dnkey. Deze is null indien dnkeymilinrichtingen is gevuld.';
COMMENT ON COLUMN public.tbhorontheffingen.dddatum
IS 'Datum van ontheffing.';
COMMENT ON COLUMN public.tbhorontheffingen.dvtijd1van
IS 'Tijdstip 1 vanaf.';
COMMENT ON COLUMN public.tbhorontheffingen.dvtijd1tot
IS 'Tijdstip 1 tot.';
COMMENT ON COLUMN public.tbhorontheffingen.dvtijd2van
IS 'Tijdstip 2 vanaf.';
COMMENT ON COLUMN public.tbhorontheffingen.dvtijd2tot
IS 'Tijdstip 2 tot.';
COMMENT ON COLUMN public.tbhorontheffingen.dvnotitie
IS 'Memoveldje.';
COMMENT ON COLUMN public.tbhorontheffingen.dnkeycontactadressen
IS 'Foreign key naar TbContactadressen.dnkey Leidinggevende die op dag en tijd aanwezig is.';
COMMENT ON COLUMN public.tbhorontheffingen.dnkeymilinrichtingen
IS 'Foreign key naar TbMilinrichtingen.dnkey. Deze is null indien dnkeyhorvergunning is gevuld.';
CREATE INDEX idx_horonthef_dddatum ON public.tbhorontheffingen
USING btree (dddatum);
CREATE INDEX idx_horonthef_keycont ON public.tbhorontheffingen
USING btree (dnkeycontactadressen);
CREATE INDEX idx_horonthef_keyhorverg ON public.tbhorontheffingen
USING btree (dnkeyhorvergunning);
CREATE INDEX idx_tbhoronth_keymilinr ON public.tbhorontheffingen
USING btree (dnkeymilinrichtingen);
This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 22-01-2013 17:28 |
![]() ![]() ![]() |