Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / subin

PRIMARY KEY - is a constraint(restriction) placed on one or a group of more than one columns of a table by the database admin (who does so while creating the table) that the value(s) of this column(s) will never be duplicate ensuring that every record(row) of the table is a unique one.
# There can only be a single primary key for a table. Hence the name primary key.
# This is the key used by foreign keys of other tables
to identify a unique record of this table.
# null value cannot be given to columns of primary key as
it will not ensure uniqueness of the record.


UNIQUE KEY - is a constraint on one or group of columns that
disallows duplication of records. It differs from primary key in that
# no restrictions to number of unique keys for a table.
# depending on different database software being used
one or many records can have null values.


FOREIGN KEY - constraint placed on certain column(s) of a table ensuring that the set of value(s) in theese column(s) will uniquely identify a record in a mentioned foreign table (mentioned while defining foreign key)that should be aptly associated with this record of this table.This is achieved with the help of primary key of the foreign table.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

3093


What do you mean by database?

1080


aht is the difference b/w network & hierarchial & relational dbms????

2211


What is a driver in database?

1153


Given a table Employee which has columns name and salary, write an SQL query to find the employee with the second highest salary.

1133


What are different types of resources?

1010


Explain about ur projets on teradata???

1771


What is a sequence? Explain it with one example?

1190


What is the difference between a stored procedure and a query?

1090


Can a database table exist without a primary key?

949


how to configure oracle 10g in java1.5 and tell me know how to set class path in system?

2044


During insert operation in Netezza Connector, if we give direct option as Yes , is there any issue?

1381


Which database does facebook use?

977


What are the tools used for backup and ticketing?

998


What is the difference between database and server?

1022