title: What is the purpose of constraint naming
body: <p>What is the purpose of naming your constraints (unique, primary key, foreign key)?</p>
  
  <p>Say I have a table which is using natural keys as a primary key:</p>
  
  <pre><code>CREATE TABLE Order
  (
      LoginName        VARCHAR(50)    NOT NULL,
      ProductName      VARCHAR(50)    NOT NULL,
      NumberOrdered    INT            NOT NULL,
      OrderDateTime    DATETIME       NOT NULL,
      PRIMARY KEY(LoginName, OrderDateTime)
  );
  </code></pre>
  
  <p>What benefits (if any) does naming my PK bring?</p>
  
  <p>Eg.
  Replace:</p>
  
  <pre><code>    PRIMARY KEY(LoginName, OrderDateTime)
  </code></pre>
  
  <p>With:</p>
  
  <pre><code>    CONSTRAINT Order_PK PRIMARY KEY(LoginName, OrderDateTime)
  </code></pre>
  
  <p>Sorry if my data model is not the best, I'm new to this!</p>