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

Answer Posted / nitin bisht

PRIMARY KEY: A tabLe can aontain 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. Its aloow 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 ?    123 Yes 43 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How heap is implemented in database?

636


What is a database call?

548


What is database bounce?

585


How to do Data integrity testing? Who does this testing (Developer or tester)?

1603


What is table scan and index scan?

609






What is database schema name?

572


What is Data Modelling?

627


hai if any one having any project sample table structure please froward to my mail id tauseefwst@yahoo.com

1939


Which is the best graph database?

528


What is difference between clustered, non-clustered and unique index?

598


Explain transaction manager?

607


What is the candidate key used for?

618


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

919


Explain inner and outer joins with examples.

707


First input columns brand, mt, re values are ov, 1,re vg, 2,re wu ,3,re. Second input columns are brand, mt, cx their records are ov,4,vg ,5,cx Wu, 6,cx and third input columns brand, mt, rt values are ov,7,rt vg, 8,rt wu, 9,rt but my output is brand, re, cx,rt values are ov, 1,4,7 vg, 2,5,8 wu, 3,6,9

1303