Schema
Owner
woodseer
Tablespace
(default)
Descriptions
Table of measurements of singularities detections
Fields
PK | FK | Name | Data type | Not null | Unique | Inherited | Default | Description |
---|---|---|---|---|---|---|---|---|
|
mdet_id |
serial |
|
nextval('t_measure_mdet_mdet_id_seq'::regclass) |
Digital automatic identifier of the measurement |
|||
|
mdet_det_id |
integer |
|
|
|
Identifier of the corresponding singularity detection |
||
|
mdet_var_id |
integer |
|
|
|
Identifier of the corresponding variable measured |
||
|
mdet_uni_id |
integer |
|
|
|
|
Identifier of the corresponding unit of the variable measured |
|
|
mdet_fil_id |
integer |
|
|
|
Identifier of the file in which the measurement has been provided |
||
|
mdet_tym_id |
integer |
|
|
|
|
Identifier of the corresponding measurement type of the variable measured |
|
|
mdet_std_id |
integer |
|
|
|
|
Identifier of the corresponding standard of the variable measured |
|
|
mdet_prot_id |
integer |
|
|
|
|
Identifier of the corresponding protocole of the variable measured |
|
|
|
mdet_value_num |
double precision |
|
|
|
|
value of the measurement if numeric type |
|
|
mdet_value_text |
varchar |
|
|
|
|
value of the measurement if text type |
|
|
mdet_value_date |
date |
|
|
|
|
value of the measure if it is a date type |
|
|
mdet_date_measure |
date |
|
|
|
|
date of the measurement |
|
|
mdet_precision_date_measure |
double precision |
|
|
|
|
Accuracy of the date of the measurement |
|
|
mdet_precision_measure |
double precision |
|
|
|
|
Acuracy of the measurement |
|
|
mdet_observation |
varchar(255) |
|
|
|
|
Additional information about the measurement |
Foreign Keys
Name | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|
mdet_det_id |
det_id |
No Action |
No Action |
|
Immediate |
a measure must be attached to one and only one singularity detection |
||
mdet_fil_id |
fil_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 file |
||
mdet_prot_id |
prot_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 protocol |
||
mdet_std_id |
std_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 standard |
||
mdet_tym_id |
tym_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 type of measure |
||
mdet_uni_id |
uni_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 unit |
||
mdet_var_id |
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_mdet
Indices
Name | Type | Function | Fields | Primary Key | Unique | Description |
---|---|---|---|---|---|---|
btree |
|
mdet_det_id, mdet_var_id, mdet_date_measure |
|
The set identifier of the singularity detection / identifier of the variable / date of the measure is unique |
||
btree |
|
mdet_det_id, mdet_var_id |
|
The variable / singularity detection pair is unique if the measure date is not entered. |
||
btree |
|
mdet_id |
|
|||
btree |
|
mdet_det_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
mdet_fil_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
mdet_prot_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
mdet_std_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
mdet_tym_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
mdet_uni_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
mdet_var_id |
|
|
Foreign key index to speed up updates / deletion |
Triggers
There are no triggers for table t_measure_mdet
Rules
There are no rules for table t_measure_mdet
Policies
There are no policies for table t_measure_mdet
Referenced
Table | Schema | Foreign Key | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|---|---|
romdet_mdet_id |
mdet_id |
No Action |
No Action |
|
Immediate |
The rom_mdet_id field necessarily corresponds to an existing measure |
Properties
Property | Value |
---|---|
Inherited From |
|
Rows |
0 |
Pages |
0 |
System |
|
Temporary |
|
With OID |
Definition
CREATE TABLE public.t_measure_mdet (
mdet_id SERIAL,
mdet_det_id INTEGER NOT NULL,
mdet_var_id INTEGER NOT NULL,
mdet_uni_id INTEGER,
mdet_fil_id INTEGER NOT NULL,
mdet_tym_id INTEGER,
mdet_std_id INTEGER,
mdet_prot_id INTEGER,
mdet_value_num DOUBLE PRECISION,
mdet_value_text VARCHAR,
mdet_value_date DATE,
mdet_date_measure DATE,
mdet_precision_date_measure DOUBLE PRECISION,
mdet_precision_measure DOUBLE PRECISION,
mdet_observation VARCHAR(255),
CONSTRAINT c_uni_det_var_datemeasure_mdet UNIQUE(mdet_det_id, mdet_var_id, mdet_date_measure),
CONSTRAINT t_measure_mdet_pkey PRIMARY KEY(mdet_id),
CONSTRAINT c_fk_det_mdet FOREIGN KEY (mdet_det_id)
REFERENCES public.t_detection_singularity_det(det_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_fil_mdet FOREIGN KEY (mdet_fil_id)
REFERENCES public.tr_file_fil(fil_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_prot_mdet FOREIGN KEY (mdet_prot_id)
REFERENCES public.tr_protocol_prot(prot_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_std_mdet FOREIGN KEY (mdet_std_id)
REFERENCES public.tr_standard_std(std_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_tym_mdet FOREIGN KEY (mdet_tym_id)
REFERENCES public.tr_type_measure_tym(tym_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_uni_mdet FOREIGN KEY (mdet_uni_id)
REFERENCES public.tr_unit_uni(uni_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_var_mdet FOREIGN KEY (mdet_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_mdet
IS 'Table of measurements of singularities detections';
COMMENT ON COLUMN public.t_measure_mdet.mdet_id
IS 'Digital automatic identifier of the measurement';
COMMENT ON COLUMN public.t_measure_mdet.mdet_det_id
IS 'Identifier of the corresponding singularity detection';
COMMENT ON COLUMN public.t_measure_mdet.mdet_var_id
IS 'Identifier of the corresponding variable measured';
COMMENT ON COLUMN public.t_measure_mdet.mdet_uni_id
IS 'Identifier of the corresponding unit of the variable measured';
COMMENT ON COLUMN public.t_measure_mdet.mdet_fil_id
IS 'Identifier of the file in which the measurement has been provided';
COMMENT ON COLUMN public.t_measure_mdet.mdet_tym_id
IS 'Identifier of the corresponding measurement type of the variable measured';
COMMENT ON COLUMN public.t_measure_mdet.mdet_std_id
IS 'Identifier of the corresponding standard of the variable measured';
COMMENT ON COLUMN public.t_measure_mdet.mdet_prot_id
IS 'Identifier of the corresponding protocole of the variable measured';
COMMENT ON COLUMN public.t_measure_mdet.mdet_value_num
IS 'value of the measurement if numeric type';
COMMENT ON COLUMN public.t_measure_mdet.mdet_value_text
IS 'value of the measurement if text type';
COMMENT ON COLUMN public.t_measure_mdet.mdet_value_date
IS 'value of the measure if it is a date type';
COMMENT ON COLUMN public.t_measure_mdet.mdet_date_measure
IS 'date of the measurement';
COMMENT ON COLUMN public.t_measure_mdet.mdet_precision_date_measure
IS 'Accuracy of the date of the measurement';
COMMENT ON COLUMN public.t_measure_mdet.mdet_precision_measure
IS 'Acuracy of the measurement';
COMMENT ON COLUMN public.t_measure_mdet.mdet_observation
IS 'Additional information about the measurement';
COMMENT ON CONSTRAINT c_fk_det_mdet ON public.t_measure_mdet
IS 'a measure must be attached to one and only one singularity detection';
COMMENT ON CONSTRAINT c_fk_fil_mdet ON public.t_measure_mdet
IS 'a measure can be attached to O or 1 file';
COMMENT ON CONSTRAINT c_fk_prot_mdet ON public.t_measure_mdet
IS 'a measure can be attached to O or 1 protocol';
COMMENT ON CONSTRAINT c_fk_std_mdet ON public.t_measure_mdet
IS 'a measure can be attached to O or 1 standard';
COMMENT ON CONSTRAINT c_fk_tym_mdet ON public.t_measure_mdet
IS 'a measure can be attached to O or 1 type of measure';
COMMENT ON CONSTRAINT c_fk_uni_mdet ON public.t_measure_mdet
IS 'a measure can be attached to O or 1 unit';
COMMENT ON CONSTRAINT c_fk_var_mdet ON public.t_measure_mdet
IS 'a measure must be attached to one and only one variable';
COMMENT ON CONSTRAINT c_uni_det_var_datemeasure_mdet ON public.t_measure_mdet
IS 'The set identifier of the singularity detection / identifier of the variable / date of the measure is unique';
CREATE UNIQUE INDEX c_uni_det_var_mdet ON public.t_measure_mdet
USING btree (mdet_det_id, mdet_var_id)
WHERE (mdet_date_measure IS NULL);
COMMENT ON INDEX public.c_uni_det_var_mdet
IS 'The variable / singularity detection pair is unique if the measure date is not entered.';
CREATE INDEX x_btr_fkey_det_mdet ON public.t_measure_mdet
USING btree (mdet_det_id);
COMMENT ON INDEX public.x_btr_fkey_det_mdet
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_fil_mdet ON public.t_measure_mdet
USING btree (mdet_fil_id);
COMMENT ON INDEX public.x_btr_fkey_fil_mdet
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_prot_mdet ON public.t_measure_mdet
USING btree (mdet_prot_id);
COMMENT ON INDEX public.x_btr_fkey_prot_mdet
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_std_mdet ON public.t_measure_mdet
USING btree (mdet_std_id);
COMMENT ON INDEX public.x_btr_fkey_std_mdet
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_tym_mdet ON public.t_measure_mdet
USING btree (mdet_tym_id);
COMMENT ON INDEX public.x_btr_fkey_tym_mdet
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_uni_mdet ON public.t_measure_mdet
USING btree (mdet_uni_id);
COMMENT ON INDEX public.x_btr_fkey_uni_mdet
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_var_mdet ON public.t_measure_mdet
USING btree (mdet_var_id);
COMMENT ON INDEX public.x_btr_fkey_var_mdet
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 |