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
1. How to test Database? Please, give me all details for "SQL,Msaccess, Mysql Database? 2.For which functionalities database used? 3.How to convert Guest to Admin by Mysql database?
What is a sequence? Explain it with one example?
What does new grouping sets enables you to do?
define primary key index, bitmap index, hash index,virtual indwx
What are different types of joins used in?
How does non-cluster index functions?
What is the purpose of firebase?
What are different types of data models available? Explain with example?
How does database replication work?
What do you mean by database?
What are different types of clusters present?
What is the difference between specialization and generalization?
What is the DIF format and when we will use in teradata
How many types of normalization? What is the use of it?
What is the role of tester in discovery(in Checklist)?