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
After normalization, what are the conditions which have to keep in mind to de-normalize it?
Explain normalization in one line?
What is aws documentdb?
Explain various types of locks in a transaction? Which is better and why?
How to do Data size testing? Who does this testing (Developer or tester)?
what is data access layer?
What is database server and how it works?
What is the use of graph database?
What is table scan and index scan?
How is image stored in database?
List the properties of a transaction.
What is difference between data and database?
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
how to send multiple records which matches all the condition in the lookup transformation ? (if lookup matches the codition for duplicate values)
What is database and its types?