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 difference between foreign key and reference key

Answers were Sorted based on User's Feedback



what is difference between foreign key and reference key..

Answer / suresh kumar

Hi, i give the definitions with easy understand exapmles

A primary key is used to uniquely identify each row in a
table. It can either be part of the actual record itself,
or it can be an artificial field (one that has nothing to
do with the actual record).
A primary key can consist of one or more fields on a table.
When multiple fields are used as a primary key, they are
called a composite key.

EX:If we take EMP table, Empno is the primary key and in
DEPT table, Deptno is the primary keys

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

EX:In EMP table Deptno field is the foreign key because it
pointing to the Deptno in DEPT table

A Reference key is a field (or fields) that points to the
primary key of the same table

EX:In EMP table Mgr field is the Reference key because it
pointing to the Empno field in the same table

Is This Answer Correct ?    64 Yes 12 No

what is difference between foreign key and reference key..

Answer / soujanya

Foreign key is the key i.e. attribute which refers to
another table primary key. Reference key is the primary key
of table referred by another table.

Is This Answer Correct ?    37 Yes 16 No

what is difference between foreign key and reference key..

Answer / anup

very simple...we use primary key or foreign key whenever we need to make relation.ex..if we need to join student (Roll P.K) and marks(roll F.K.) then we can join both tables only if we have primary key in one table and foreign key in other..one table may have n numbers of foreign key and n number of primary key (Called composite key)..mail me if u need more details in oracle or any front end lang...anup from chennai,Ranchi.

Is This Answer Correct ?    8 Yes 27 No

Post New Answer

More Oracle General Interview Questions

Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).

0 Answers  


What is the difference between formal parameters and actual parameters?

0 Answers  


What is merge statement used for?

0 Answers  


What are the roles of dba?

0 Answers  


How you open and close a cursor variable.Why it is required?

2 Answers  


What are the restrictions in a oracle read only transaction?

0 Answers  


State the difference between a primary key and foreign key?

0 Answers  


Hi Masters, in Oracle Applications 11i, we hace 2 functions using the same form, i need to create 1 personalization, but that code must afect only one function.... how can i do that?

0 Answers  


How a tablespace is related to data files?

0 Answers  


What is flashback in Oracle?

0 Answers   MCN Solutions,


What is the difference between SQL, DDL, and DML?

7 Answers   BeBo Technologies, Wipro,


What is Database Trigger ?

1 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)