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 the difference between primary and candidate key?
what is data access layer?
Explain storage manager?
After normalization, what are the conditions which have to keep in mind to de-normalize it?
What is sharded database?
i have windows-xp processor with P4 system. whenever I tried to download foxpro for windows 2.6 on windows XP, my operating system failed to install foxpro for windows 2.6.please. how could i download , install & run foxpro for windows 2.6 easily on windows XP ?
What are database connection details?
What is the difference between a stored procedure and a query?
can i use the commands "modify" and Change in DB2 to alter my column datatype and its name in a table?
Does facebook use graph database?
What is ole db used for?
What is ase database?
Hi, I want do a course in DWH Informatica Administrator and Abinito Administrator please tell me some institute in chennai and i am searching for a job,so please help me and my mail id : satty_rh@yahoo.co.in Thanks, Kumar
WHAT IS CARDINALITIES OF JOIN?
What are the various ways to execute a query in teradata?