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

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

1666


Explain entity ?

598


What is ole db used for?

580


Can a database table exist without a primary key?

534


What are database connection details?

642






What do you mean by database?

590


What is odm in database?

579


how to reject duplicates in source sequential file and if by filter option then where is that filter option in the sequential file.

1105


How many types of normalization? What is the use of it?

614


What advantages does DBMS have over traditional file systems?

591


What is a sequence? Explain it with one example?

641


Define stored procedure?

601


What are the concurrency problems a database faces?

560


Explain phantom deadlock?

778


wHat Is THE difference between MOVEL and MOVEL(P)……….. CAN ANYONE EXPLAIN ME..

2502