A Candidate key is a column or group of columns that you think has the
possibility of being a good key for the table. It is a design phase issue,
and not an actual physical implementation.

A primary key is a column or group of columns that is designated to be the
'primary key'. It is a physical implementation. You use DDL syntax to 'tell'
the database that this is the primary key. A primary key will always have a
corresponding index which the system will automatically create when you
specify the primary key.

A Foreign Key column or group of columns that serve as a logical pointer
from one row (record) to another. Most often the rows reside in different
tables. An index for for a Foreign Key is optional, but usually desirable
for performance reasons. A 'foreign key constraint' is a foreign key which
you have told the database about. If you don't tell the database about it,
it's still a foreign key, but it is up to the application code to maintain
the integrity. If you tell the database about it (using DDL syntax)  by
creating a 'foreign key constraint' then the database can enforce the
referential integrity.

Regards,
Mike

On Thu, Dec 3, 2009 at 5:45 AM, raju <rajuadr...@gmail.com> wrote:

> please tell me the function of primary key and candidate key and
> foreign key
>
> --
> You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to Oracle-PLSQL@googlegroups.com
> To unsubscribe from this group, send email to
> oracle-plsql-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to