Page 1 of 1

What is the "d - determine" constraint type?

Posted: Thu May 15, 2014 8:46 pm
by Julie
Hi,

From the docs I see that Vertica 7 supports the constraint types:
  • c — check is reserved, but not supported
    f - foreign
    n - not null
    p - primary
    u - unique
    d - determines
What is the "d - determine" constraint type?

Re: What is the "d - determine" constraint type?

Posted: Mon May 19, 2014 3:14 am
by JimKnicely
The "determines" constraints is created when a column correlation is defined. For example:

Code: Select all

dbadmin=> create table test (a int, b int, c int primary key);
CREATE TABLE
dbadmin=> alter table test add constraint t_cor correlation (b) determines (a);
ALTER TABLE
dbadmin=> select constraint_name, table_name, constraint_type from table_constraints where table_name = 'test';
 constraint_name | table_name | constraint_type 
-----------------+------------+-----------------
 C_PRIMARY       | test       | p
 t_cor           | test       | d
(2 rows)

Re: What is the "d - determine" constraint type?

Posted: Tue Nov 10, 2015 3:23 pm
by avoronin
Hello All,
Can someone explain what this "correlation detarmines" constraint means ?

Re: What is the "d - determine" constraint type?

Posted: Wed Nov 11, 2015 2:44 pm
by JimKnicely
http://my.vertica.com/docs/7.2.x/HTML/i ... %7C_____34

When creating a design, Database Designer can:
  • Analyze correlated columns.
  • Order the correlated columns in a way that maximizes the compression ratio.
  • Place them early in the projection sort order.
  • Choose Run-Length Encoding (RLE) for the columns that satisfy the recommended RLE criteria.