what is the difference between primary key & foreign key?

Answer Posted / mohammadazam

A primary key is an combination of attributes that uniquely
identifies each row in a relation. A primary key is
designated by underlining the attribute name. The primary
key of an entity set allows us to distinguish among the
various entities of the set.

A foreign key is an attribute in a relation of database
that serves as the primary key of another relation in the
same database.

Is This Answer Correct ?    17 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are a query and state the different types of queries and their uses?

512


What is max rowid in oracle?

559


Why packages are used in oracle?

545


How to insert a new row into a table in oracle?

593


Difference between the “verify” and “feedback” command?

775






How to connect to the server with user account: sys?

568


How does the on-delete-cascade statement work?

610


How to use subqueries in the from clause in oracle?

582


What is a named program unit?

582


What happens to the indexes if a table is recovered?

579


Differentiate between translate and replace?

633


State any two functions of oracle?

636


What are the differences between char and varchar2 in oracle?

565


What is oracle update statement with inner join ?

585


What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?

1607