Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, santhoshreddy.

Asked: October 03, 2016 - 8:22 am UTC

Last updated: November 11, 2016 - 5:19 am UTC

Version: 11g

Viewed 1000+ times

You Asked

Hi Tom,
I am Oracle Beginner,I know integral constraints.So Please Explain me below concepts
1.What are candidate key,super key,Prime Attributes,non-prime attributes?
2.What is the difference between candidate and unique key?
3.how we can use them,because i never find any syntax for them?

and Connor said...

(A brief description below)

A candidate key is a key that uniquely designates a row in a table.

One of these candidate keys will be used as the table's primary key, typically based on business requirement or which key seems the most "natural" key. Any candidate key that is not used as the primary key is an "alternate key".

Prime attributes are the elements of a candidate key that defines the uniqueness. Non-prime attributes are anything else.

Once you get to implementing these in a database, they'll fall into the category of primary and unique constraints. We've got some good info in the Concepts guide here

http://docs.oracle.com/database/121/CNCPT/datainte.htm#CNCPT021




Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

santhoshreddy podduturi, November 10, 2016 - 6:29 am UTC

But I never seen any synax for candidate key,and i heard the candidate key primary key are difference in refening other tables.
Connor McDonald
November 11, 2016 - 5:19 am UTC

A candidate key is a *concept*. It pertains to the logical model of your database. For example, you wont ever see the term "index-organised table" in the *logical* model, because it pertains to the physical implementation of the logical model