Schema
Owner
woodseer
Tablespace
(default)
Descriptions
Table of measurements of acquisitions
Fields
PK | FK | Name | Data type | Not null | Unique | Inherited | Default | Description |
---|---|---|---|---|---|---|---|---|
|
macq_id |
serial |
|
nextval('t_measure_macq_macq_id_seq'::regclass) |
Digital automatic identifier of the acquisition measurement |
|||
|
macq_acq_id |
integer |
|
|
|
Identifier of the corresponding singularity detection |
||
|
macq_var_id |
integer |
|
|
|
Identifier of the corresponding variable measured |
||
|
macq_uni_id |
integer |
|
|
|
|
Identifier of the corresponding unit of the variable measured |
|
|
macq_fil_id |
integer |
|
|
|
Identifier of the file in which the measurement has been provided |
||
|
macq_std_id |
integer |
|
|
|
|
Identifier of the associated standard to the measurement |
|
|
macq_tym_id |
integer |
|
|
|
|
Identifier of the type of measurement |
|
|
macq_prot_id |
integer |
|
|
|
|
Identifier of the protocol applied for the measurement |
|
|
|
macq_value_num |
double precision |
|
|
|
|
value of the measurement if numeric type |
|
|
macq_value_text |
varchar |
|
|
|
|
value of the measurement if text type |
|
|
macq_value_date |
date |
|
|
|
|
value of the measure if it is a date type |
|
|
macq_date_measure |
date |
|
|
|
|
date of the measure |
|
|
macq_precision_date_measure |
double precision |
|
|
|
|
Accuracy of the date of the measurement |
|
|
macq_precision_measure |
double precision |
|
|
|
|
Acuracy of the measurement |
|
|
macq_observation |
varchar(255) |
|
|
|
|
Additional information about the measurement |
Foreign Keys
Name | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|
macq_acq_id |
acq_id |
No Action |
No Action |
|
Immediate |
a measure must be attached to one and only one acquisition |
||
macq_fil_id |
fil_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 file |
||
macq_prot_id |
prot_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 protocol |
||
macq_std_id |
std_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 unit |
||
macq_tym_id |
tym_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 type of measure |
||
macq_uni_id |
uni_id |
No Action |
No Action |
|
Immediate |
a measure can be attached to O or 1 unit |
||
macq_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_macq
Indices
Name | Type | Function | Fields | Primary Key | Unique | Description |
---|---|---|---|---|---|---|
btree |
|
macq_acq_id, macq_var_id, macq_date_measure |
|
The set identifier of the acquisition / identifier of the variable / date of the measure is unique |
||
btree |
|
macq_acq_id, macq_var_id |
|
The variable / acquisition pair is unique if the measure date is not entered. |
||
btree |
|
macq_id |
|
|||
btree |
|
macq_acq_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
macq_fil_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
macq_prot_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
macq_std_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
macq_tym_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
macq_uni_id |
|
|
Foreign key index to speed up updates / deletion |
|
btree |
|
macq_var_id |
|
|
Foreign key index to speed up updates / deletion |
Triggers
There are no triggers for table t_measure_macq
Rules
There are no rules for table t_measure_macq
Policies
There are no policies for table t_measure_macq
Referenced
Table | Schema | Foreign Key | Fields | FK Table | FK Fields | Delete Action | Update Action | Deferrable | Check Time | Description |
---|---|---|---|---|---|---|---|---|---|---|
romacq_macq_id |
macq_id |
No Action |
No Action |
|
Immediate |
The rom_macq_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_macq (
macq_id SERIAL,
macq_acq_id INTEGER NOT NULL,
macq_var_id INTEGER NOT NULL,
macq_uni_id INTEGER,
macq_fil_id INTEGER NOT NULL,
macq_std_id INTEGER,
macq_tym_id INTEGER,
macq_prot_id INTEGER,
macq_value_num DOUBLE PRECISION,
macq_value_text VARCHAR,
macq_value_date DATE,
macq_date_measure DATE,
macq_precision_date_measure DOUBLE PRECISION,
macq_precision_measure DOUBLE PRECISION,
macq_observation VARCHAR(255),
CONSTRAINT c_uni_acq_var_datemeasure_macq UNIQUE(macq_acq_id, macq_var_id, macq_date_measure),
CONSTRAINT t_measure_macq_pkey PRIMARY KEY(macq_id),
CONSTRAINT c_fk_acq_macq FOREIGN KEY (macq_acq_id)
REFERENCES public.t_acquisition_acq(acq_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_fil_macq FOREIGN KEY (macq_fil_id)
REFERENCES public.tr_file_fil(fil_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_prot_macq FOREIGN KEY (macq_prot_id)
REFERENCES public.tr_protocol_prot(prot_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_std_macq FOREIGN KEY (macq_std_id)
REFERENCES public.tr_standard_std(std_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_tym_macq FOREIGN KEY (macq_tym_id)
REFERENCES public.tr_type_measure_tym(tym_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_uni_macq FOREIGN KEY (macq_uni_id)
REFERENCES public.tr_unit_uni(uni_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT c_fk_var_macq FOREIGN KEY (macq_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_macq
IS 'Table of measurements of acquisitions';
COMMENT ON COLUMN public.t_measure_macq.macq_id
IS 'Digital automatic identifier of the acquisition measurement';
COMMENT ON COLUMN public.t_measure_macq.macq_acq_id
IS 'Identifier of the corresponding singularity detection';
COMMENT ON COLUMN public.t_measure_macq.macq_var_id
IS 'Identifier of the corresponding variable measured';
COMMENT ON COLUMN public.t_measure_macq.macq_uni_id
IS 'Identifier of the corresponding unit of the variable measured';
COMMENT ON COLUMN public.t_measure_macq.macq_fil_id
IS 'Identifier of the file in which the measurement has been provided';
COMMENT ON COLUMN public.t_measure_macq.macq_std_id
IS 'Identifier of the associated standard to the measurement';
COMMENT ON COLUMN public.t_measure_macq.macq_tym_id
IS 'Identifier of the type of measurement';
COMMENT ON COLUMN public.t_measure_macq.macq_prot_id
IS 'Identifier of the protocol applied for the measurement';
COMMENT ON COLUMN public.t_measure_macq.macq_value_num
IS 'value of the measurement if numeric type';
COMMENT ON COLUMN public.t_measure_macq.macq_value_text
IS 'value of the measurement if text type';
COMMENT ON COLUMN public.t_measure_macq.macq_value_date
IS 'value of the measure if it is a date type';
COMMENT ON COLUMN public.t_measure_macq.macq_date_measure
IS 'date of the measure';
COMMENT ON COLUMN public.t_measure_macq.macq_precision_date_measure
IS 'Accuracy of the date of the measurement';
COMMENT ON COLUMN public.t_measure_macq.macq_precision_measure
IS 'Acuracy of the measurement';
COMMENT ON COLUMN public.t_measure_macq.macq_observation
IS 'Additional information about the measurement';
COMMENT ON CONSTRAINT c_fk_acq_macq ON public.t_measure_macq
IS 'a measure must be attached to one and only one acquisition';
COMMENT ON CONSTRAINT c_fk_fil_macq ON public.t_measure_macq
IS 'a measure can be attached to O or 1 file';
COMMENT ON CONSTRAINT c_fk_prot_macq ON public.t_measure_macq
IS 'a measure can be attached to O or 1 protocol';
COMMENT ON CONSTRAINT c_fk_std_macq ON public.t_measure_macq
IS 'a measure can be attached to O or 1 unit';
COMMENT ON CONSTRAINT c_fk_tym_macq ON public.t_measure_macq
IS 'a measure can be attached to O or 1 type of measure';
COMMENT ON CONSTRAINT c_fk_uni_macq ON public.t_measure_macq
IS 'a measure can be attached to O or 1 unit';
COMMENT ON CONSTRAINT c_fk_var_macq ON public.t_measure_macq
IS 'a measure must be attached to one and only one variable';
COMMENT ON CONSTRAINT c_uni_acq_var_datemeasure_macq ON public.t_measure_macq
IS 'The set identifier of the acquisition / identifier of the variable / date of the measure is unique';
CREATE UNIQUE INDEX c_uni_acq_var_macq ON public.t_measure_macq
USING btree (macq_acq_id, macq_var_id)
WHERE (macq_date_measure IS NULL);
COMMENT ON INDEX public.c_uni_acq_var_macq
IS 'The variable / acquisition pair is unique if the measure date is not entered.';
CREATE INDEX x_btr_fkey_acq_macq ON public.t_measure_macq
USING btree (macq_acq_id);
COMMENT ON INDEX public.x_btr_fkey_acq_macq
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_fil_macq ON public.t_measure_macq
USING btree (macq_fil_id);
COMMENT ON INDEX public.x_btr_fkey_fil_macq
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_prot_macq ON public.t_measure_macq
USING btree (macq_prot_id);
COMMENT ON INDEX public.x_btr_fkey_prot_macq
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_std_macq ON public.t_measure_macq
USING btree (macq_std_id);
COMMENT ON INDEX public.x_btr_fkey_std_macq
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_tym_macq ON public.t_measure_macq
USING btree (macq_tym_id);
COMMENT ON INDEX public.x_btr_fkey_tym_macq
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_uni_macq ON public.t_measure_macq
USING btree (macq_uni_id);
COMMENT ON INDEX public.x_btr_fkey_uni_macq
IS 'Foreign key index to speed up updates / deletion';
CREATE INDEX x_btr_fkey_var_macq ON public.t_measure_macq
USING btree (macq_var_id);
COMMENT ON INDEX public.x_btr_fkey_var_macq
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 |