answersLogoWhite

0


Best Answer

KEYS IN SQL

* Alternate key - An alternate key is any candidate key which is not selected to be the primary key

* Candidate key - A candidate key is a field or combination of fields that can act as a primary key field for that table to uniquely identify each record in that table.

For Eg:

The table:

Emloyee(Name,Address,Ssn,Employee_Idprimary_key,Phone_ext)

In the above example Ssn no. and employee identity are ccandidate keys.

* Compound key - compound key (also called a composite key or concatenated key) is a key that consists of 2 or more attributes.

* Primary key - a primary key is a value that can be used to identify a unique row in a table. Attributes are associated with it. Examples of primary keys are Social Security numbers (associated to a specific person) or ISBNs (associated to a specific book).

In the relational model of data, a primary key is a candidate key chosen as the main method of uniquely identifying a tuple in a relation.

For Eg:

Emloyee(Name,Address,Ssn,Employee_Idprimary_key,Phone_ext)

* Superkey - A superkey is defined in the relational model as a set of attributes of a relation variable (relvar) for which it holds that in all relations assigned to that variable there are no two distinct tuples (rows) that have the same values for the attributes in this set. Equivalently a superkey can also be defined as a set of attributes of a relvar upon which all attributes of the relvar are functionally dependent.

For Eg:

Emloyee(Name,Address,Ssn,Employee_Idprimary_key,Phone_ext)

All the above are super keys.

* Foreign key - a foreign key (FK) is a field or group of fields in a database record that points to a key field or group of fields forming a key of another database record in some (usually different) table. Usually a foreign key in one table refers to the primary key (PK) of another table. This way references can be made to link information together and it is an essential part of database normalization.

For Eg:

For a Student....

School(Name,Address,Phone,School_Reg_noprimary_key

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Explain about primary key super key candidate key alternate key composite key foreign key?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Types of keys in database management system?

super key foreign key candidate key surrogate key unique key alternate key composite key compound key


How much types of keys are available in dbms?

There are five types of keys in database management system . The name of the five keys are as follows .:1) surrogate key -which is the system generated primary key .2) Primary key - same function as surrogate key but user defined.3) candidate key -combination of two more keys.4) alternate keys - alternative for candidate keys.5) foreign key - primary key of another table.There are five types of keys in database management system.These five keys are surrogate, primary, candidate, alternate, foreign keys .


Types of keys?

There are many keys in database each having particular use. Types of keys in database are : Primary key, candidate key, alternate key, foreign key, surrogate key.


Can a column in a composite key be a foreign key to another table?

Hi, As per I know you can't define a foreign key column which is a part of a composite primary key of another table. Only way you've to refer all the columns of that composite key. UKD


How do you apply a foreign key in a database?

The foreign key is a reference to a key (identifier) of a row in another or even the same table. When the foreign key is not null, it implies that there's an entry in the referenced table with that identifier. The syntax depends on wich database are you using, check the page in the related links below.


Should foreign born people be the candidate as a president in the US and Why?

Foreign born people are not eligible to be president in the US , so they can not be serious candidates.


Explain two rules in relational model of database systems?

1) Entity Integrity: In a base relation, no attribute of a primary key can be null. 2) Referential Integrity: If foreign key exists in a relation, either foreign key value must match a candidate key value of some tuple in its home relation or foreign key value must be wholly null


What vice presidential candidate helped pass many foreign policy laws?

Joe Bidden


Can anyone explain why 'The Artist' was not nominated in the category 'Best Foreign Movie'?

Ironically, because it's not in a foreign language.


Why is a field with an autonumber data type not a good candidate for the foreign key field for a one to many relationship?

The foreign key has to match the information from the corresponding record in the other table.


Why do you designate one of the candidate key of relation to be the primary key?

We designate one of the candidate key of a relation to be a primary key because that primary key is use for any foreign key references.


Difference between foreign key and composite key?

primary key: primary creates a clustered index on the column and it doesn't allow null values. unique key: unique key creates non clustered index by default.it allows "one null value". foreign key: A foreign key (FK) is a column or combination of columns used to establish and enforce a link between the data in two tables. Fore More information, you can visit this website:http://www.iyogibusiness.com