Schema
Owner
woodseer
Tablespace
(default)
Descriptions
Table of study zones representing a geographic entity of variable level and that can be nested.
Fields
PK | FK | Name | Data type | Not null | Unique | Inherited | Default | Description |
---|---|---|---|---|---|---|---|---|
|
zon_id |
serial |
|
nextval('tr_study_zone_zon_zon_id_seq'::regclass) |
automatic numeric identifier of the study zone |
|||
|
|
zon_tree |
public.ltree |
|
|
Complete single tree structure of the zone, each node being separated by the character ''.'' |
||
|
zon_typz_id |
integer |
|
|
|
automatic numeric identifier of the type of study zone |
||
|
|
zon_code |
varchar(32) |
|
|
|
Unique code of the study zone |
|
|
|
zon_label |
varchar(96) |
|
|
|
Label of the study zone |
Foreign Keys
Name | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|
zon_typz_id |
typz_id |
No Action |
No Action |
|
Immediate |
a study zone must be attached to 1 and 1 type of study zone |
Check Constraints
There are no check constraints for table tr_study_zone_zon
Indices
Name | Type | Function | Fields | Primary Key | Unique | Description |
---|---|---|---|---|---|---|
btree |
|
zon_tree |
|
The complete tree structure of a study zone must be unique |
||
btree |
|
zon_id |
|
|||
btree |
|
zon_typz_id |
|
|
Foreign key index to speed up updates / deletion |
Triggers
There are no triggers for table tr_study_zone_zon
Rules
There are no rules for table tr_study_zone_zon
Policies
There are no policies for table tr_study_zone_zon
Referenced
Table | Schema | Foreign Key | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|---|---|
mzon_zon_id |
zon_id |
No Action |
No Action |
|
Immediate |
a measure must be attached to one and only one object |
||||
obj_zon_id |
zon_id |
No Action |
No Action |
|
Immediate |
An object is link to 0 or 1 study zone |
Properties
Property | Value |
---|---|
Inherited From |
|
Rows |
10 |
Pages |
1 |
System |
|
Temporary |
|
With OID |
Definition
CREATE TABLE public.tr_study_zone_zon (
zon_id SERIAL,
zon_tree public.ltree NOT NULL,
zon_typz_id INTEGER NOT NULL,
zon_code VARCHAR(32) NOT NULL,
zon_label VARCHAR(96) NOT NULL,
CONSTRAINT c_uni_tree_zon UNIQUE(zon_tree),
CONSTRAINT tr_study_zone_zon_pkey PRIMARY KEY(zon_id),
CONSTRAINT c_fk_typz_zon FOREIGN KEY (zon_typz_id)
REFERENCES public.tr_type_study_zone_typz(typz_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE
) ;
COMMENT ON TABLE public.tr_study_zone_zon
IS 'Table of study zones representing a geographic entity of variable level and that can be nested.';
COMMENT ON COLUMN public.tr_study_zone_zon.zon_id
IS 'automatic numeric identifier of the study zone';
COMMENT ON COLUMN public.tr_study_zone_zon.zon_tree
IS 'Complete single tree structure of the zone, each node being separated by the character ''''.''''';
COMMENT ON COLUMN public.tr_study_zone_zon.zon_typz_id
IS 'automatic numeric identifier of the type of study zone';
COMMENT ON COLUMN public.tr_study_zone_zon.zon_code
IS 'Unique code of the study zone';
COMMENT ON COLUMN public.tr_study_zone_zon.zon_label
IS 'Label of the study zone';
COMMENT ON CONSTRAINT c_fk_typz_zon ON public.tr_study_zone_zon
IS 'a study zone must be attached to 1 and 1 type of study zone';
COMMENT ON CONSTRAINT c_uni_tree_zon ON public.tr_study_zone_zon
IS 'The complete tree structure of a study zone must be unique';
CREATE INDEX x_btr_fkey_typz_zon ON public.tr_study_zone_zon
USING btree (zon_typz_id);
COMMENT ON INDEX public.x_btr_fkey_typz_zon
IS 'Foreign key index to speed up updates / deletion';
This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 07/12/2018 13:23 |