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

Can a database table exist without a primary key?

538


List various types of log-based recovery in DBMS.

571


What advantages does DBMS have over traditional file systems?

592


can i use the commands "modify" and Change in DB2 to alter my column datatype and its name in a table?

1666


Explain about ur projets on teradata???

1360






Is hive a database?

558


What is the difference between oracle and MS Access?

615


What is a database call?

553


how node connect with cpu?

1664


What are the advantages of using database?

548


Write a query to retrieve for many to many relationships?

574


What are different types of blocks used in stored procedure?

629


what is ad-hoc access? what is the diff b/w managed query and ad-hoc access?

1887


i applied prompt on country when i run report it shows list of all countries but want it to show only four countries name

1661


Explain natural key?

620