Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Primary keys vs. unique indexes

Re: Primary keys vs. unique indexes

From: Nikunj Gupta <good_dba_at_hotmail.com>
Date: Fri, 1 Dec 2000 00:50:04 -0800
Message-Id: <10697.123378@fatcity.com>


This is a multi-part message in MIME format.

------=_NextPart_000_0086_01C05B30.A46AE2C0 Content-Type: text/plain;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

RE: Primary keys vs. unique indexesHello Lisa,

PRIMARY KEY means UNIQUE and NOT NULL...

Hope that explains..

Nikunj

  What? Yes you can. I have anyway.=20

  Can you give me an example of when that would not work?=20

  Lisa Rutland Koivu=20
  Oracle Database Administrator=20
  Qode.com=20
  4850 North State Road 7=20
  Suite G104=20
  Fort Lauderdale, FL 33319=20

  V: 954.484.3191, x174=20
  F: 954.484.2933=20
  C: 954.658.5849=20

  http://www.qode.com=20

  "The information contained herein does not express the opinion or = position of Qode.com and cannot be attributed to or made binding upon = Qode.com."

  -----Original Message-----=20
  From: james ellis [mailto:jellis24_gso_at_yahoo.com]=20   Sent: Thursday, November 30, 2000 11:51 AM=20   To: Multiple recipients of list ORACLE-L=20   Subject: Re: Primary keys vs. unique indexes=20

  The main difference is you can not reference an unique=20   index with a foreign key.=20

  __________________________________________________=20
  Do You Yahoo!?=20
  Yahoo! Shopping - Thousands of Stores. Millions of Products.=20   http://shopping.yahoo.com/=20
  --=20
  Please see the official ORACLE-L FAQ: http://www.orafaq.com=20   --=20
  Author: james ellis=20
    INET: jellis24_gso_at_yahoo.com=20

  Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051=20   San Diego, California -- Public Internet access / Mailing Lists =

  --------------------------------------------------------------------=20
  To REMOVE yourself from this mailing list, send an E-Mail message=20   to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in=20   the message BODY, include a line containing: UNSUB ORACLE-L=20   (or the name of mailing list you want to be removed from). You may=20   also send the HELP command for other information (like subscribing).=20

------=_NextPart_000_0086_01C05B30.A46AE2C0 Content-Type: text/html;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: Primary keys vs. unique indexes</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello Lisa,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PRIMARY KEY means UNIQUE and NOT=20
NULL...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hope that explains..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Nikunj</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">   <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>   <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20
  <A title=3Dlkoivu_at_qode.com href=3D"mailto:lkoivu_at_qode.com">Koivu, = Lisa</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3DORACLE-L_at_fatcity.com=20
  href=3D"mailto:ORACLE-L_at_fatcity.com">Multiple recipients of list = ORACLE-L</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, November 30, = 2000 09:20=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: Primary keys vs. = unique=20
  indexes</DIV>
  <DIV><BR></DIV>
  <P><FONT size=3D2>What?&nbsp; Yes you can.&nbsp; I have anyway. = </FONT></P>
  <P><FONT size=3D2>Can you give me an example of when that would not = work?</FONT>=20
  </P>
  <P><FONT size=3D2>Lisa Rutland Koivu</FONT> <BR><FONT size=3D2>Oracle = Database=20
  Administrator</FONT> <BR><FONT size=3D2>Qode.com</FONT> <BR><FONT = size=3D2>4850=20
  North State Road 7</FONT> <BR><FONT size=3D2>Suite G104</FONT> = <BR><FONT=20
  size=3D2>Fort Lauderdale, FL&nbsp; 33319</FONT> </P>   <P><FONT size=3D2>V: 954.484.3191, x174</FONT> <BR><FONT size=3D2>F: = 954.484.2933=20
  </FONT><BR><FONT size=3D2>C: 954.658.5849</FONT> <BR><FONT size=3D2><A =

  target=3D_blank =
href=3D"http://www.qode.com">http://www.qode.com</A></FONT> </P>   <P><FONT size=3D2>"The information contained herein does not express = the opinion=20
  or position of Qode.com and cannot be attributed to or made binding = upon=20
  Qode.com."</FONT></P><BR>
  <P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT = size=3D2>From: james=20
  ellis [<A=20
  =
href=3D"mailto:jellis24_gso_at_yahoo.com">mailto:jellis24_gso_at_yahoo.com</A>]= </FONT>=20
  <BR><FONT size=3D2>Sent: Thursday, November 30, 2000 11:51 AM</FONT> = <BR><FONT=20
  size=3D2>To: Multiple recipients of list ORACLE-L</FONT> <BR><FONT=20   size=3D2>Subject: Re: Primary keys vs. unique indexes</FONT> </P><BR>   <P><FONT size=3D2>The main difference is you can not reference an = unique</FONT>=20
  <BR><FONT size=3D2>index with a foreign key. </FONT><BR><FONT = size=3D2>---=20
  cemail_at_sprintmail.com wrote:</FONT> <BR><FONT size=3D2>&gt; = </FONT><BR><FONT=20
  size=3D2>&gt; What is the difference between building a table = and</FONT>=20
  <BR><FONT size=3D2>&gt; including</FONT> <BR><FONT size=3D2>&gt; the = primary key=20
  versus building the table and then</FONT> <BR><FONT size=3D2>&gt; = having=20
  creating</FONT> <BR><FONT size=3D2>&gt; a unique index on the same = keys?&nbsp;=20
  When you create a</FONT> <BR><FONT size=3D2>&gt; table with</FONT> = <BR><FONT=20
  size=3D2>&gt; a primary key, doesn't Oracle store it as an = index</FONT>=20
  <BR><FONT size=3D2>&gt; anyway?</FONT> <BR><FONT size=3D2>&gt; = </FONT><BR><FONT=20
  size=3D2>&gt; -----</FONT> <BR><FONT size=3D2>&gt; Sent using = MailStart.com=20
  (</FONT> <BR><FONT size=3D2>&gt; <A target=3D_blank=20   =
href=3D"http://MailStart.Com/welcome.html">http://MailStart.Com/welcome.h= tml</A>=20
  )</FONT> <BR><FONT size=3D2>&gt; The FREE way to access your mailbox = via any=20
  web</FONT> <BR><FONT size=3D2>&gt; browser, anywhere!</FONT> <BR><FONT =

  size=3D2>&gt; </FONT><BR><FONT size=3D2>&gt; -- </FONT><BR><FONT = size=3D2>&gt;=20
  Please see the official ORACLE-L FAQ:</FONT> <BR><FONT size=3D2>&gt; = <A=20
  target=3D_blank =
href=3D"http://www.orafaq.com">http://www.orafaq.com</A></FONT>=20   <BR><FONT size=3D2>&gt; -- </FONT><BR><FONT size=3D2>&gt; Author: = </FONT><BR><FONT=20
  size=3D2>&gt;&nbsp;&nbsp; INET: cemail_at_sprintmail.com</FONT> <BR><FONT =

  size=3D2>&gt; </FONT><BR><FONT size=3D2>&gt; Fat City Network=20   Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX:</FONT> = <BR><FONT=20
  size=3D2>&gt; (858) 538-5051</FONT> <BR><FONT size=3D2>&gt; San Diego, =

  California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public = Internet</FONT>=20
  <BR><FONT size=3D2>&gt; access / Mailing Lists</FONT> <BR><FONT=20   size=3D2>&gt;</FONT> <BR><FONT=20
  =

size=3D2>----------------------------------------------------------------=
----</FONT>=20
  <BR><FONT size=3D2>&gt; To REMOVE yourself from this mailing list, = send=20
  an</FONT> <BR><FONT size=3D2>&gt; E-Mail message</FONT> <BR><FONT = size=3D2>&gt;=20
  to: ListGuru_at_fatcity.com (note EXACT spelling of</FONT> <BR><FONT = size=3D2>&gt;=20
  'ListGuru') and in</FONT> <BR><FONT size=3D2>&gt; the message BODY, = include a=20
  line containing: UNSUB</FONT> <BR><FONT size=3D2>&gt; ORACLE-L</FONT> = <BR><FONT=20
  size=3D2>&gt; (or the name of mailing list you want to be = removed</FONT>=20
  <BR><FONT size=3D2>&gt; from).&nbsp; You may</FONT> <BR><FONT = size=3D2>&gt; also=20
  send the HELP command for other information</FONT> <BR><FONT = size=3D2>&gt; (like=20
  subscribing).</FONT> </P><BR>
  <P><FONT =
size=3D2>__________________________________________________</FONT>=20
  <BR><FONT size=3D2>Do You Yahoo!?</FONT> <BR><FONT size=3D2>Yahoo! = Shopping -=20
  Thousands of Stores. Millions of Products.</FONT> <BR><FONT = size=3D2><A=20
  target=3D_blank=20
  =
href=3D"http://shopping.yahoo.com/">http://shopping.yahoo.com/</A></FONT>= =20
  <BR><FONT size=3D2>-- </FONT><BR><FONT size=3D2>Please see the = official ORACLE-L=20
  FAQ: <A target=3D_blank=20
  href=3D"http://www.orafaq.com">http://www.orafaq.com</A></FONT> = <BR><FONT=20
  size=3D2>-- </FONT><BR><FONT size=3D2>Author: james ellis</FONT> = <BR><FONT=20
  size=3D2>&nbsp; INET: jellis24_gso_at_yahoo.com</FONT> </P>   <P><FONT size=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) =

  538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT size=3D2>San = Diego,=20
  California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public = Internet access=20
  / Mailing Lists</FONT> <BR><FONT=20
  =

size=3D2>----------------------------------------------------------------=
----</FONT>=20
  <BR><FONT size=3D2>To REMOVE yourself from this mailing list, send an = E-Mail=20
  message</FONT> <BR><FONT size=3D2>to: ListGuru_at_fatcity.com (note EXACT = spelling=20
  of 'ListGuru') and in</FONT> <BR><FONT size=3D2>the message BODY, = include a line=20
  containing: UNSUB ORACLE-L</FONT> <BR><FONT size=3D2>(or the name of = Received on Fri Dec 01 2000 - 02:50:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US