db_globoxylo
Previous topic Chapter index Next topic

Table: t_measure_mtre

 

 

Schema

public

 

Owner

postgres

 

Tablespace

(default)

 

Descriptions

Table of variable measures for a specific type of object

 

Columns

PK

FK

Name

Data type

Not null

Unique

Inherited

Default

Description

 

mtre_id

serial

 

nextval('t_measure_mtre_mtre_id_seq'::regclass)

Automatic numeric identifier of the measure

 

mtre_tre_id

integer

 

 

 

Automatic numeric identifier of the associated object

 

mtre_tym_id

integer

 

 

 

 

Automatic numeric identifier of the associated type of measure

 

mtre_var_id

integer

 

 

 

Automatic numeric identifier of the associated variable

 

mtre_fil_id

integer

 

 

 

 

Automatic numeric identifier of the associated file

 

mtre_prot_id

integer

 

 

 

 

Automatic numeric identifier of the associated protocol

 

mtre_std_id

integer

 

 

 

 

Automatic numeric identifier of the associated standard

 

mtre_uni_id

integer

 

 

 

 

Automatic numeric identifier of the associated unit of measure

 

 

mtre_value_num

double precision

 

 

 

 

value of the measure if it is of numeric type

 

 

mtre_value_text

varchar

 

 

 

 

value of the measure if it is of type text

 

 

mtre_value_date

date

 

 

 

 

value of the measure if it is of type date

 

 

mtre_date_measure

date

 

 

 

 

date of the measure

 

 

mtre_precision_date_measure

double precision

 

 

 

 

Precision concerning the date of the measurement

 

 

mtre_precision_measure

double precision

 

 

 

 

Precision of the measure value

 

 

mtre_observation

varchar

 

 

 

 

Additional information associated with the measure

 

Foreign Keys

Name

Columns

FK Table

FK Columns

Delete Action

Update Action

Deferrable

Check Time

Description

c_fk_fil_mtre

mtre_fil_id

public.tr_file_fil

fil_id

No Action

No Action

 

Immediate

a measure can be attached to O or 1 file

c_fk_prot_mtre

mtre_prot_id

public.tr_protocol_prot

prot_id

No Action

No Action

 

Immediate

a measure can be attached to O or 1 protocol

c_fk_std_mtre

mtre_std_id

public.tr_standard_std

std_id

No Action

No Action

 

Immediate

a measure can be attached to O or 1 standard

c_fk_tre_mtre

mtre_tre_id

public.t_tree_tre

tre_id

No Action

No Action

 

Immediate

a measure must be attached to one and only one object

c_fk_tym_mtre

mtre_tym_id

public.tr_type_measure_tym

tym_id

No Action

No Action

 

Immediate

a measure can be attached to O or 1 type of measure

c_fk_uni_mtre

mtre_uni_id

public.tr_unit_uni

uni_id

No Action

No Action

 

Immediate

a measure can be attached to O or 1 unit

c_fk_var_mtre

mtre_var_id

public.tr_variable_var

var_id

No Action

No Action

 

Immediate

a measure must be attached to one and only one variable

 

Check Constraints

There are no check constraints for table t_measure_mtre

 

Indices

Name

Type

Function

Columns

Primary Key

Unique

Description

c_uni_tre_var_datemeasure_mtre

btree

 

mtre_tre_id, mtre_var_id, mtre_date_measure

 

The set identifier of the object / identifier of the variable / date of the measure is unique

c_uni_tre_var_mtre

btree

 

mtre_tre_id, mtre_var_id

 

The variable / object pair is unique if the measure date is not entered.

t_measure_mtre_pkey

btree

 

mtre_id

 

x_btr_fkey_fil_mtre

btree

 

mtre_fil_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_prot_mtre

btree

 

mtre_prot_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_std_mtre

btree

 

mtre_std_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_tre_mtre

btree

 

mtre_tre_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_tym_mtre

btree

 

mtre_tym_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_uni_mtre

btree

 

mtre_uni_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_var_mtre

btree

 

mtre_var_id

 

 

Foreign key index to speed up updates / deletion

 

Triggers

There are no triggers for table t_measure_mtre

 

Rules

There are no rules for table t_measure_mtre

 

Policies

There are no policies for table t_measure_mtre

 

Referenced

Table

Schema

Foreign Key

Columns

FK Table

FK Columns

Delete Action

Update Action

Deferrable

Check Time

Description

tj_grp_mtre_gmt

public

c_fk_mtre_gmt

gmt_mtre_id

public.t_measure_mtre

mtre_id

No Action

No Action

 

Immediate

The gmt_mtre_id field necessarily corresponds to an existing measure

tj_mtre_mtre_ttre

public

c_fk_meta_mtre_ttre

ttre_meta_mtre_id

public.t_measure_mtre

mtre_id

No Action

No Action

 

Immediate

The ttre_meta_mtre_id field necessarily corresponds to an existing measure

tj_mtre_mtre_ttre

public

c_fk_ref_mtre_ttre

ttre_ref_mtre_id

public.t_measure_mtre

mtre_id

No Action

No Action

 

Immediate

The ttre_ref_mtre_id field necessarily corresponds to an existing measure

tj_rol_ope_mtre_rot

public

c_fk_mtre_rot

rot_mtre_id

public.t_measure_mtre

mtre_id

No Action

No Action

 

Immediate

The rot_mtre_id field necessarily corresponds to an existing measure

 

Properties

Property

Value

Inherited From

 

Rows

-1

Pages

0

System

 

Temporary

 

With OID

 

Definition

CREATE TABLE public.t_measure_mtre (
 mtre_id SERIAL,
 mtre_tre_id INTEGER NOT NULL,
 mtre_tym_id INTEGER,
 mtre_var_id INTEGER NOT NULL,
 mtre_fil_id INTEGER,
 mtre_prot_id INTEGER,
 mtre_std_id INTEGER,
 mtre_uni_id INTEGER,
 mtre_value_num DOUBLE PRECISION,
 mtre_value_text VARCHAR,
 mtre_value_date DATE,
 mtre_date_measure DATE,
 mtre_precision_date_measure DOUBLE PRECISION,
 mtre_precision_measure DOUBLE PRECISION,
 mtre_observation VARCHAR,
 CONSTRAINT c_uni_tre_var_datemeasure_mtre UNIQUE(mtre_tre_id, mtre_var_id, mtre_date_measure),
 CONSTRAINT t_measure_mtre_pkey PRIMARY KEY(mtre_id),
 CONSTRAINT c_fk_fil_mtre FOREIGN KEY (mtre_fil_id)
   REFERENCES public.tr_file_fil(fil_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_prot_mtre FOREIGN KEY (mtre_prot_id)
   REFERENCES public.tr_protocol_prot(prot_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_std_mtre FOREIGN KEY (mtre_std_id)
   REFERENCES public.tr_standard_std(std_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_tre_mtre FOREIGN KEY (mtre_tre_id)
   REFERENCES public.t_tree_tre(tre_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_tym_mtre FOREIGN KEY (mtre_tym_id)
   REFERENCES public.tr_type_measure_tym(tym_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_uni_mtre FOREIGN KEY (mtre_uni_id)
   REFERENCES public.tr_unit_uni(uni_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_var_mtre FOREIGN KEY (mtre_var_id)
   REFERENCES public.tr_variable_var(var_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE

) ;

COMMENT ON TABLE public.t_measure_mtre
IS 'Table of variable measures for a specific type of object';

COMMENT ON COLUMN public.t_measure_mtre.mtre_id
IS 'Automatic numeric identifier of the measure';

COMMENT ON COLUMN public.t_measure_mtre.mtre_tre_id
IS 'Automatic numeric identifier of the associated object';

COMMENT ON COLUMN public.t_measure_mtre.mtre_tym_id
IS 'Automatic numeric identifier of the associated type of measure';

COMMENT ON COLUMN public.t_measure_mtre.mtre_var_id
IS 'Automatic numeric identifier of the associated variable';

COMMENT ON COLUMN public.t_measure_mtre.mtre_fil_id
IS 'Automatic numeric identifier of the associated file';

COMMENT ON COLUMN public.t_measure_mtre.mtre_prot_id
IS 'Automatic numeric identifier of the associated protocol';

COMMENT ON COLUMN public.t_measure_mtre.mtre_std_id
IS 'Automatic numeric identifier of the associated standard';

COMMENT ON COLUMN public.t_measure_mtre.mtre_uni_id
IS 'Automatic numeric identifier of the associated unit of measure';

COMMENT ON COLUMN public.t_measure_mtre.mtre_value_num
IS 'value of the measure if it is of numeric type';

COMMENT ON COLUMN public.t_measure_mtre.mtre_value_text
IS 'value of the measure if it is of type text';

COMMENT ON COLUMN public.t_measure_mtre.mtre_value_date
IS 'value of the measure if it is of type date';

COMMENT ON COLUMN public.t_measure_mtre.mtre_date_measure
IS 'date of the measure';

COMMENT ON COLUMN public.t_measure_mtre.mtre_precision_date_measure
IS 'Precision concerning the date of the measurement';

COMMENT ON COLUMN public.t_measure_mtre.mtre_precision_measure
IS 'Precision of the measure value';

COMMENT ON COLUMN public.t_measure_mtre.mtre_observation
IS 'Additional information associated with the measure';

COMMENT ON CONSTRAINT c_fk_fil_mtre ON public.t_measure_mtre
IS 'a measure can be attached to O or 1 file';

COMMENT ON CONSTRAINT c_fk_prot_mtre ON public.t_measure_mtre
IS 'a measure can be attached to O or 1 protocol';

COMMENT ON CONSTRAINT c_fk_std_mtre ON public.t_measure_mtre
IS 'a measure can be attached to O or 1 standard';

COMMENT ON CONSTRAINT c_fk_tre_mtre ON public.t_measure_mtre
IS 'a measure must be attached to one and only one object';

COMMENT ON CONSTRAINT c_fk_tym_mtre ON public.t_measure_mtre
IS 'a measure can be attached to O or 1 type of measure';

COMMENT ON CONSTRAINT c_fk_uni_mtre ON public.t_measure_mtre
IS 'a measure can be attached to O or 1 unit';

COMMENT ON CONSTRAINT c_fk_var_mtre ON public.t_measure_mtre
IS 'a measure must be attached to one and only one variable';

COMMENT ON CONSTRAINT c_uni_tre_var_datemeasure_mtre ON public.t_measure_mtre
IS 'The set identifier of the object / identifier of the variable / date of the measure is unique';

CREATE UNIQUE INDEX c_uni_tre_var_mtre ON public.t_measure_mtre
 USING btree (mtre_tre_id, mtre_var_id)
 WHERE (mtre_date_measure IS NULL);

COMMENT ON INDEX public.c_uni_tre_var_mtre
IS 'The variable / object pair is unique if the measure date is not entered.';

CREATE INDEX x_btr_fkey_fil_mtre ON public.t_measure_mtre
 USING btree (mtre_fil_id);

COMMENT ON INDEX public.x_btr_fkey_fil_mtre
IS 'Foreign key index to speed up updates / deletion';

CREATE INDEX x_btr_fkey_prot_mtre ON public.t_measure_mtre
 USING btree (mtre_prot_id);

COMMENT ON INDEX public.x_btr_fkey_prot_mtre
IS 'Foreign key index to speed up updates / deletion';

CREATE INDEX x_btr_fkey_std_mtre ON public.t_measure_mtre
 USING btree (mtre_std_id);

COMMENT ON INDEX public.x_btr_fkey_std_mtre
IS 'Foreign key index to speed up updates / deletion';

CREATE INDEX x_btr_fkey_tre_mtre ON public.t_measure_mtre
 USING btree (mtre_tre_id);

COMMENT ON INDEX public.x_btr_fkey_tre_mtre
IS 'Foreign key index to speed up updates / deletion';

CREATE INDEX x_btr_fkey_tym_mtre ON public.t_measure_mtre
 USING btree (mtre_tym_id);

COMMENT ON INDEX public.x_btr_fkey_tym_mtre
IS 'Foreign key index to speed up updates / deletion';

CREATE INDEX x_btr_fkey_uni_mtre ON public.t_measure_mtre
 USING btree (mtre_uni_id);

COMMENT ON INDEX public.x_btr_fkey_uni_mtre
IS 'Foreign key index to speed up updates / deletion';

CREATE INDEX x_btr_fkey_var_mtre ON public.t_measure_mtre
 USING btree (mtre_var_id);

COMMENT ON INDEX public.x_btr_fkey_var_mtre
IS 'Foreign key index to speed up updates / deletion';

This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com)
Previous topic Chapter index Next topic