title: Primary Key and Unique Index -- sql scripts generated by SQL Developer
body: <p>When export sql scripts by SQL Developer there are multiple options available, but either way there have to generate a <code>UNIQUE INDEX</code> on primary key like this</p>
  
  <pre><code>CREATE UNIQUE INDEX "SYS_C0018099" ON "TRANSACTION" ("ID") 
  </code></pre>
  
  <p>and add <code>PRIMARY KEY</code> to the same table and same column</p>
  
  <pre><code>ALTER TABLE "TRANSACTION" ADD PRIMARY KEY ("ID")
  </code></pre>
  
  <p>So the question is: does it looks like kind of redundancy? I thought creating a primary key on a column should by default create an unique index on that column too? So why the first command is necessary?</p>
  
  <p>And this may cause data redundancy?</p>
  
  <p>I am on Oracle 11g so please share any ideas about why it should look like above.</p>
  
  <p>Thanks in advance.</p>