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

What is a database example?

536


What is the importance of database partitioning?

606


What are different types of clusters present?

597


What is database server and how it works?

551


You are creating a Index on EMPNO column in the EMPLOYEE table. Which statement will you use?

780






What are the concurrency problems a database faces?

560


how can you perform lookup range in lookup stage expalin in detail?

1522


What does specialization in DBMS mean?

642


WHAT IS THE PURPOSE OF TESTING INTEGRITY OF THE UNIVERSE?

1818


Write a query to get maximum and second maximum in oracle?

600


What is a trace file?

632


What are the disadvantages of views in a database?

540


what is rcp,if rcp disabled what happen?

1710


Is redis in memory database?

534


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

1455