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
There are three servers are run by Oracle, MS Access and .Net. What are the procedure fetching the values of two variables from two servers among these?
can i use the commands "modify" and Change in DB2 to alter my column datatype and its name in a table?
What is difference between data and database?
What are different types of clusters present?
Which is the most reliable programming language for RDBMS Relational Database Management System for Multi user applicaton. For PC application or web application ?
Is it good to store images in database?
Can we use redis as database?
What does new grouping sets enables you to do?
Should I store images in database?
What is the advantage of varchar2 over char?
What is the difference between primary and candidate key?
What happens when shared and exclusive locks are applied on data item?
You are creating a Index on EMPNO column in the EMPLOYEE table. Which statement will you use?
How to do Data size testing? Who does this testing (Developer or tester)?
What are database connection details?