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

Answer Posted / anbarasu

UNIQUE KEY: A Table may contain one or more UNIQUE
constraints. It’s allowing 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 ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a database example?

536


Does facebook use graph database?

607


What is ole db in ssis?

610


Is data lake a database?

561


What is odm database?

541






What is the difference between primary and candidate key?

576


query to Compare data of two tables between two different Databases(Oracle and SQL Server) Eg., Source Database: Oracle Table: Employee Target Database : SQL Server Table : emp

1637


What is relational database with example?

541


what are wrappers and build ups and what it's use?

1694


After normalization, what are the conditions which have to keep in mind to de-normalize it?

614


What is the difference between specialization and generalization?

574


What is the Difference Primary key and Unique Key

573


How does non-cluster index functions?

643


What is the database url?

550


can i use the commands "modify" and Change in DB2 to alter my column datatype and its name in a table?

1666