what is primary key,unique key, foreign key? can u teach me
in simple language?

Answer Posted / kiran chandra sarkar

PRIMARY KEY: A table can contain only one PRIMARY KEY. It
doesn’t allow null values; it is used as Foreign Key in
another Table (like Reference Key).

UNIQUE KEY: A Table may contain one or more UNIQUE
constraints. It’s allowing only one null value. Use this
key we maintain unique vales in the table.

FOREIGN KEY: A key used in one table to represent the value
of a primary key in a related table. While primary keys
must contain unique values, foreign keys may have
duplicates. For instance, if we use student ID as the
primary key in a Students table (each student has a unique
ID), we could use student ID as a foreign key in a Courses
table: as each student may do more than one course, the
student ID field in the Courses table (often shortened to
Courses. student ID) Will hold duplicate values.

Is This Answer Correct ?    92 Yes 29 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Given a table of Player which contains Sno and player name, write a query which finds all possible Table Tennis doubles pairings.

921


diff b/w inter process and in process

1558


What are the advantages of using database?

548


What is database client?

543


A design problem was given in which I was supposed to make a design for the data base for a given problem.

561






What is the DIF format and when we will use in teradata

2085


What are the advantages of views in a database?

642


What is the purpose of TNS?

656


Explain buffer manager?

555


Which is the best graph database?

533


What is relational database with example?

541


What is global database name?

545


Explain about ur projets on teradata???

1356


What is the role of tester in discovery(in Checklist)?

1455


How does non-cluster index functions?

643