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
What is a database example?
What is the importance of database partitioning?
What are different types of clusters present?
What is database server and how it works?
You are creating a Index on EMPNO column in the EMPLOYEE table. Which statement will you use?
What are the concurrency problems a database faces?
how can you perform lookup range in lookup stage expalin in detail?
What does specialization in DBMS mean?
WHAT IS THE PURPOSE OF TESTING INTEGRITY OF THE UNIVERSE?
Write a query to get maximum and second maximum in oracle?
What is a trace file?
What are the disadvantages of views in a database?
what is rcp,if rcp disabled what happen?
Is redis in memory database?
What is the role of tester in discovery(in Checklist)?