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 / pappu

The primary key of a relational table uniquely identifies
each record in the table. It can either be a normal
attribute that is guaranteed to be unique (such as Social
Security Number in a table with no more than one record per
person) or it can be generated by the DBMS (such as a
globally unique identifier, or GUID, in Microsoft SQL
Server). Primary keys may consist of a single attribute or
multiple attributes in combination

a unique key can uniquely identify each row in a table,
and is closely related to the Superkey concept. A unique
key comprises a single column or a set of columns. No two
distinct rows in a table can have the same value (or
combination of values) in those columns if NULL values are
not used. Depending on its design, a table may have
arbitrarily many unique keys but at most one primary key.

Unique keys do not enforce the NOT NULL constraint in
practice. Because NULL is not an actual value (it
represents the lack of a value), when two rows are
compared, and both rows have NULL in a column, the column
values are not considered to be equal. Thus, in order for a
unique key to uniquely identify each row in a table, NULL
values must not be used, however a column defined as unique
key column allows only one null value, which in turn can
uniquely identify that row/tuple.


A foreign key is a field (or fields) that points to the
primary key of another table. The purpose of the foreign
key is to ensure referential integrity of the data. In
other words, only values that are supposed to appear in the
database are permitted.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the validations performed on the source data? If there are junk data available in the source data, how to eliminate it?

1948


Write a query to get maximum and second maximum in oracle?

994


What is database bounce?

986


What will happen non-clustered index will be created on clustered index?

979


What is ase database?

961


Explain transaction manager?

1009


What are different types of blocks used in stored procedure?

1062


What do you mean by database?

1017


On startup, the transaction log of a database has filled and recovery has suspended, what can I do?

937


How many indexes can be created on a table?

1070


Explain about ur projets on teradata???

1727


How do I manually create a database?

1098


HOW PASS PARAMETERS FOLLOWING ORDER RPG-CL-RPG?

2378


What is ole db in ssis?

1013


A lowest level of security by most RDBMS is

1089