title: RELY Constraint in View
body: <p>While learning inline_constraint and out_of_line_constraint for view. I get this example in oracle documentation.<a href="http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_8004.htm#i2126714" rel="nofollow">http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_8004.htm#i2126714</a> </p>
  
  <pre><code>CREATE VIEW emp_sal (emp_id, last_name, 
        email UNIQUE RELY DISABLE NOVALIDATE,
     CONSTRAINT id_pk PRIMARY KEY (emp_id) RELY DISABLE NOVALIDATE)
     AS SELECT employee_id, last_name, email FROM employees;
  </code></pre>
  
  <p>I have so many doubts in this statement:<br>
  <b>1) what is rely constaint</b> - This constraint is useful when queries typically access views instead of base tables, and the DBA thus needs to define the data relationships between views rather than tables. 
  <br>
  But in this example it is not materialized views so data will be accessed through base table only. Could you please explain function and when to use rely constraint. <br>
  2) what is the use of unique key if we have disabled it like in this statement.</p>