what is primary key,unique key, foreign key? can u teach me
in simple language?
Answer Posted / sathish
1)Primary key is unique key but foriegn key always refers
to
primary key.
2) Primary keys enforce entity integrity by uniquely
identifying entity instances. Foreign keys enforce.
3)Primary key is unique
primary key is not NULL and
foreign key is NULL
foreign key reference as Primary key in another table.
4) primary key is used to identify a row and it doesnot
allow
null values. It avoids duplication of rows.
whereas foreign key refers to a column or combination of
columns included in the defenition of referential integrity.
referential integrity by completing an association between
two entities.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How do I setup a database connection?
What is Data Modelling?
What is the use of default key?
what are wrappers and build ups and what it's use?
How heap is implemented in database?
diff b/w inter process and in process
Explain phantom deadlock?
What is the relationship that exists inside in E-R diagram?
How to implement database security?
What is the Difference Primary key and Unique Key
Design an ETL process( batch job/script)from source to starting that u will not be dependent on the source in the near future?please elobarate details on what are things to consider.if you'd like to do a diagram that will be great.please answer it
What do you mean by cluster and non cluster index?
What is replicaset?
How many indexes can be created on a table?
What is the difference between a stored procedure and a query?