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

Answer Posted / raviraj bhardwaj

Primary key - Primary key means main key
def:- A primary key is one which uniquely identifies a row
of a table. this key does not allow null values and also
does not allow duplicate values. for ex,
empno empname salary
1 priya 35000
2 preeti 34000
3 niharika 40000

it will not the values as follows:
1 priya 35000
1 preeti 34000
niharika 35000


unique key~ unique key creates non clustered index by
default.it allows "one null value".

forigen key~
when the primary key of one table injected in other table to
make a relationship then the other key of the other table is
called foreign key.
for ex-
Dept table employs
deptno deptmame deptloc eid ename eadd deptno

in it deptno inter relate bothe the tables so that deptno
works here as a forigen kye..

Is This Answer Correct ?    15 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

624


Explain normalization in one line?

642


What is aws documentdb?

648


Explain various types of locks in a transaction? Which is better and why?

607


How to do Data size testing? Who does this testing (Developer or tester)?

2129






what is data access layer?

1982


What is database server and how it works?

557


What is the use of graph database?

553


What is table scan and index scan?

620


How is image stored in database?

584


List the properties of a transaction.

641


What is difference between data and database?

559


can any one tell me how i can start database testing mean what should be initial point and how i can write a query for listing page of any item thanks in advance

2105


how to send multiple records which matches all the condition in the lookup transformation ? (if lookup matches the codition for duplicate values)

1597


What is database and its types?

562