Schema
public
Owner
waveuser005
Tablespace
(default)
Descriptions
Tabel van geplande en afgeronde bezoeken per inspectietraject
Fields
PK | FK | Name | Data type | Not null | Unique | Inherited | Default | Description |
---|---|---|---|---|---|---|---|---|
|
dnkey |
serial |
|
nextval('tbinspbezoeken_dnkey_seq'::regclass) |
Primary. |
|||
|
dnkeyinspecties |
integer |
|
|
|
|
Foreign key naar TbInspecties.dnkey. |
|
|
dvcodemedewerkers |
char(5) |
|
|
|
|
De inspecteur die voor het bezoek gepland staat. Foreign key naar TbMedewerkers.DvCode. |
|
|
|
ddgepland |
timestamp |
|
|
|
|
Datum bezoek gepland. |
|
|
ddafgehandeld |
timestamp |
|
|
|
|
Datum bezoek uitgevoerd. |
|
|
dvverslag |
varchar(2000) |
|
|
|
|
Verslag van het bezoek. |
|
dnkeyinspsoortbezoek |
integer |
|
|
|
|
Foreign key naar TbInspSoortbezoek.dnkey. |
|
|
dnkeycontactadressen |
integer |
|
|
|
|
Gesproken met. Foreign key naar TbContactadressen.dnkey |
|
|
|
dvtijdstip |
char(5) |
|
|
|
|
Geplande tijd van inspectiebezoek |
Foreign Keys
Name | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|
cfk_tbcontactadr_keyadres |
dnkeycontactadressen |
dnkey |
No Action |
No Action |
|
Immediate |
|
|
cfk_tbinspbez_keyinspsrtbez |
dnkeyinspsoortbezoek |
dnkey |
No Action |
No Action |
|
Immediate |
|
|
cfk_tbinspbez_tbinspecties |
dnkeyinspecties |
dnkey |
Cascade |
No Action |
|
Immediate |
|
|
cfk_tbinspbez_tbmedewerkers |
dvcodemedewerkers |
dvcode |
No Action |
No Action |
|
Immediate |
|
Check Constraints
Name | Condition | Description |
---|---|---|
cnn_inspbez_codemw |
dvcodemedewerkers IS NOT NULL |
|
cnn_inspbez_ddgepland |
ddgepland IS NOT NULL |
|
cnn_inspbez_keyinspecties |
dnkeyinspecties IS NOT NULL |
|
Indices
Name | Type | Function | Fields | Primary Key | Unique | Description |
---|---|---|---|---|---|---|
cpk_tbinspbezoeken |
btree |
|
dnkey |
|
||
idx_inspbez_codemw |
btree |
|
dvcodemedewerkers |
|
|
|
idx_inspbez_ddafgehandeld |
btree |
|
ddafgehandeld |
|
|
|
idx_inspbez_ddgepland |
btree |
|
ddgepland |
|
|
|
idx_inspbez_keyinspecties |
btree |
|
dnkeyinspecties |
|
|
|
idx_inspbez_keyinspsrtbez |
btree |
|
dnkeyinspsoortbezoek |
|
|
|
Triggers
There are no triggers for table tbinspbezoeken
Rules
There are no rules for table tbinspbezoeken
Referenced
Table | Schema | Foreign Key | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|---|---|
public |
cfk_tbcorresp_keyinspbezoeken |
dnkeyinspbezoeken |
dnkey |
No Action |
No Action |
|
Immediate |
|
Properties
Property | Value |
---|---|
Inherited From |
|
Rows |
0 |
Pages |
0 |
System |
|
Temporary |
|
With OID |
|
Definition
CREATE TABLE public.tbinspbezoeken (
dnkey SERIAL,
dnkeyinspecties INTEGER,
dvcodemedewerkers CHAR(5),
ddgepland TIMESTAMP WITHOUT TIME ZONE,
ddafgehandeld TIMESTAMP WITHOUT TIME ZONE,
dvverslag VARCHAR(2000),
dnkeyinspsoortbezoek INTEGER,
dnkeycontactadressen INTEGER,
dvtijdstip CHAR(5),
CONSTRAINT cpk_tbinspbezoeken PRIMARY KEY(dnkey),
CONSTRAINT cnn_inspbez_codemw CHECK (dvcodemedewerkers IS NOT NULL),
CONSTRAINT cnn_inspbez_ddgepland CHECK (ddgepland IS NOT NULL),
CONSTRAINT cnn_inspbez_keyinspecties CHECK (dnkeyinspecties IS NOT NULL),
CONSTRAINT cfk_tbcontactadr_keyadres FOREIGN KEY (dnkeycontactadressen)
REFERENCES public.tbcontactadressen(dnkey)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT cfk_tbinspbez_keyinspsrtbez FOREIGN KEY (dnkeyinspsoortbezoek)
REFERENCES public.tbinspsoortbezoek(dnkey)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT cfk_tbinspbez_tbinspecties FOREIGN KEY (dnkeyinspecties)
REFERENCES public.tbinspecties(dnkey)
ON DELETE CASCADE
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT cfk_tbinspbez_tbmedewerkers FOREIGN KEY (dvcodemedewerkers)
REFERENCES public.tbmedewerkers(dvcode)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE
)
WITH (oids = false);
COMMENT ON TABLE public.tbinspbezoeken
IS 'Tabel van geplande en afgeronde bezoeken per inspectietraject';
COMMENT ON COLUMN public.tbinspbezoeken.dnkey
IS 'Primary.';
COMMENT ON COLUMN public.tbinspbezoeken.dnkeyinspecties
IS 'Foreign key naar TbInspecties.dnkey.';
COMMENT ON COLUMN public.tbinspbezoeken.dvcodemedewerkers
IS 'De inspecteur die voor het bezoek gepland staat. Foreign key naar TbMedewerkers.DvCode.';
COMMENT ON COLUMN public.tbinspbezoeken.ddgepland
IS 'Datum bezoek gepland.';
COMMENT ON COLUMN public.tbinspbezoeken.ddafgehandeld
IS 'Datum bezoek uitgevoerd.';
COMMENT ON COLUMN public.tbinspbezoeken.dvverslag
IS 'Verslag van het bezoek.';
COMMENT ON COLUMN public.tbinspbezoeken.dnkeyinspsoortbezoek
IS 'Foreign key naar TbInspSoortbezoek.dnkey.';
COMMENT ON COLUMN public.tbinspbezoeken.dnkeycontactadressen
IS 'Gesproken met. Foreign key naar TbContactadressen.dnkey';
COMMENT ON COLUMN public.tbinspbezoeken.dvtijdstip
IS 'Geplande tijd van inspectiebezoek';
CREATE INDEX idx_inspbez_codemw ON public.tbinspbezoeken
USING btree (dvcodemedewerkers COLLATE pg_catalog."default");
CREATE INDEX idx_inspbez_ddafgehandeld ON public.tbinspbezoeken
USING btree (ddafgehandeld);
CREATE INDEX idx_inspbez_ddgepland ON public.tbinspbezoeken
USING btree (ddgepland);
CREATE INDEX idx_inspbez_keyinspecties ON public.tbinspbezoeken
USING btree (dnkeyinspecties);
CREATE INDEX idx_inspbez_keyinspsrtbez ON public.tbinspbezoeken
USING btree (dnkeyinspsoortbezoek);
This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 22-2-2017 10:50 |
![]() ![]() ![]() |