db_globoxylo
Previous topic Chapter index Next topic

Table: t_measure_msam

 

 

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

 

msam_id

serial

 

nextval('t_measure_msam_msam_id_seq'::regclass)

Automatic numeric identifier of the measure

 

msam_sam_id

integer

 

 

 

Automatic numeric identifier of the associated object

 

msam_tym_id

integer

 

 

 

 

Automatic numeric identifier of the associated type of measure

 

msam_var_id

integer

 

 

 

Automatic numeric identifier of the associated variable

 

msam_fil_id

integer

 

 

 

 

Automatic numeric identifier of the associated file

 

msam_prot_id

integer

 

 

 

 

Automatic numeric identifier of the associated protocol

 

msam_std_id

integer

 

 

 

 

Automatic numeric identifier of the associated standard

 

msam_uni_id

integer

 

 

 

 

Automatic numeric identifier of the associated unit of measure

 

 

msam_value_num

double precision

 

 

 

 

value of the measure if it is of numeric type

 

 

msam_value_text

varchar

 

 

 

 

value of the measure if it is of type text

 

 

msam_value_date

date

 

 

 

 

value of the measure if it is of type date

 

 

msam_date_measure

date

 

 

 

 

date of the measure

 

 

msam_precision_date_measure

double precision

 

 

 

 

Precision concerning the date of the measurement

 

 

msam_precision_measure

double precision

 

 

 

 

Precision of the measure value

 

 

msam_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_msam

msam_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_msam

msam_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_sam_msam

msam_sam_id

public.t_sample_sam

sam_id

No Action

No Action

 

Immediate

a measure must be attached to one and only one object

c_fk_std_msam

msam_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_tym_msam

msam_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_msam

msam_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_msam

msam_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_msam

 

Indices

Name

Type

Function

Columns

Primary Key

Unique

Description

c_uni_sam_var_datemeasure_msam

btree

 

msam_sam_id, msam_var_id, msam_date_measure

 

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

c_uni_sam_var_msam

btree

 

msam_sam_id, msam_var_id

 

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

t_measure_msam_pkey

btree

 

msam_id

 

x_btr_fkey_fil_msam

btree

 

msam_fil_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_prot_msam

btree

 

msam_prot_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_sam_msam

btree

 

msam_sam_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_std_msam

btree

 

msam_std_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_tym_msam

btree

 

msam_tym_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_uni_msam

btree

 

msam_uni_id

 

 

Foreign key index to speed up updates / deletion

x_btr_fkey_var_msam

btree

 

msam_var_id

 

 

Foreign key index to speed up updates / deletion

 

Triggers

There are no triggers for table t_measure_msam

 

Rules

There are no rules for table t_measure_msam

 

Policies

There are no policies for table t_measure_msam

 

Referenced

Table

Schema

Foreign Key

Columns

FK Table

FK Columns

Delete Action

Update Action

Deferrable

Check Time

Description

tj_grp_msam_gms

public

c_fk_msam_gms

gms_msam_id

public.t_measure_msam

msam_id

No Action

No Action

 

Immediate

The gms_msam_id field necessarily corresponds to an existing measure

tj_msam_msam_tsam

public

c_fk_meta_msam_tsam

tsam_meta_msam_id

public.t_measure_msam

msam_id

No Action

No Action

 

Immediate

The tsam_meta_msam_id field necessarily corresponds to an existing measure

tj_msam_msam_tsam

public

c_fk_ref_msam_tsam

tsam_ref_msam_id

public.t_measure_msam

msam_id

No Action

No Action

 

Immediate

The tsam_ref_msam_id field necessarily corresponds to an existing measure

tj_rol_ope_msam_ros

public

c_fk_msam_ros

ros_msam_id

public.t_measure_msam

msam_id

No Action

No Action

 

Immediate

The ros_msam_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_msam (
 msam_id SERIAL,
 msam_sam_id INTEGER NOT NULL,
 msam_tym_id INTEGER,
 msam_var_id INTEGER NOT NULL,
 msam_fil_id INTEGER,
 msam_prot_id INTEGER,
 msam_std_id INTEGER,
 msam_uni_id INTEGER,
 msam_value_num DOUBLE PRECISION,
 msam_value_text VARCHAR,
 msam_value_date DATE,
 msam_date_measure DATE,
 msam_precision_date_measure DOUBLE PRECISION,
 msam_precision_measure DOUBLE PRECISION,
 msam_observation VARCHAR,
 CONSTRAINT c_uni_sam_var_datemeasure_msam UNIQUE(msam_sam_id, msam_var_id, msam_date_measure),
 CONSTRAINT t_measure_msam_pkey PRIMARY KEY(msam_id),
 CONSTRAINT c_fk_fil_msam FOREIGN KEY (msam_fil_id)
   REFERENCES public.tr_file_fil(fil_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_prot_msam FOREIGN KEY (msam_prot_id)
   REFERENCES public.tr_protocol_prot(prot_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_sam_msam FOREIGN KEY (msam_sam_id)
   REFERENCES public.t_sample_sam(sam_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_std_msam FOREIGN KEY (msam_std_id)
   REFERENCES public.tr_standard_std(std_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_tym_msam FOREIGN KEY (msam_tym_id)
   REFERENCES public.tr_type_measure_tym(tym_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_uni_msam FOREIGN KEY (msam_uni_id)
   REFERENCES public.tr_unit_uni(uni_id)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION
   NOT DEFERRABLE
,
 CONSTRAINT c_fk_var_msam FOREIGN KEY (msam_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_msam
IS 'Table of variable measures for a specific type of object';

COMMENT ON COLUMN public.t_measure_msam.msam_id
IS 'Automatic numeric identifier of the measure';

COMMENT ON COLUMN public.t_measure_msam.msam_sam_id
IS 'Automatic numeric identifier of the associated object';

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

COMMENT ON COLUMN public.t_measure_msam.msam_var_id
IS 'Automatic numeric identifier of the associated variable';

COMMENT ON COLUMN public.t_measure_msam.msam_fil_id
IS 'Automatic numeric identifier of the associated file';

COMMENT ON COLUMN public.t_measure_msam.msam_prot_id
IS 'Automatic numeric identifier of the associated protocol';

COMMENT ON COLUMN public.t_measure_msam.msam_std_id
IS 'Automatic numeric identifier of the associated standard';

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

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

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

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

COMMENT ON COLUMN public.t_measure_msam.msam_date_measure
IS 'date of the measure';

COMMENT ON COLUMN public.t_measure_msam.msam_precision_date_measure
IS 'Precision concerning the date of the measurement';

COMMENT ON COLUMN public.t_measure_msam.msam_precision_measure
IS 'Precision of the measure value';

COMMENT ON COLUMN public.t_measure_msam.msam_observation
IS 'Additional information associated with the measure';

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

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

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

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

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

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

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

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

CREATE UNIQUE INDEX c_uni_sam_var_msam ON public.t_measure_msam
 USING btree (msam_sam_id, msam_var_id)
 WHERE (msam_date_measure IS NULL);

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

CREATE INDEX x_btr_fkey_fil_msam ON public.t_measure_msam
 USING btree (msam_fil_id);

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

CREATE INDEX x_btr_fkey_prot_msam ON public.t_measure_msam
 USING btree (msam_prot_id);

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

CREATE INDEX x_btr_fkey_sam_msam ON public.t_measure_msam
 USING btree (msam_sam_id);

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

CREATE INDEX x_btr_fkey_std_msam ON public.t_measure_msam
 USING btree (msam_std_id);

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

CREATE INDEX x_btr_fkey_tym_msam ON public.t_measure_msam
 USING btree (msam_tym_id);

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

CREATE INDEX x_btr_fkey_uni_msam ON public.t_measure_msam
 USING btree (msam_uni_id);

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

CREATE INDEX x_btr_fkey_var_msam ON public.t_measure_msam
 USING btree (msam_var_id);

COMMENT ON INDEX public.x_btr_fkey_var_msam
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