Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

FK versus PK

 
   Database Help (Home) -> Oracle -> Server RSS
Next:  xml to SQL DB  
Author Message
rpond

External


Since: Feb 22, 2005
Posts: 1



(Msg. 1) Posted: Tue Feb 22, 2005 4:14 pm
Post subject: FK versus PK
Archived from groups: comp>databases>oracle>server (more info?)

Database beginner here,

What does it mean when a column is both a primary key and a foreign key?

 >> Stay informed about: FK versus PK 
Back to top
Login to vote
slimdave

External


Since: Jan 18, 2005
Posts: 27



(Msg. 2) Posted: Tue Feb 22, 2005 4:38 pm
Post subject: Re: FK versus PK [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It could also be the case that the column is only part of the primary
key and is also a foreign key ... that would probably be a more common
case.

 >> Stay informed about: FK versus PK 
Back to top
Login to vote
Mark A2

External


Since: Mar 13, 2004
Posts: 183



(Msg. 3) Posted: Tue Feb 22, 2005 5:23 pm
Post subject: Re: FK versus PK [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"rpond" wrote in message

 > Database beginner here,
 >
 > What does it mean when a column is both a primary key and a foreign key?
 >
The column uniquely identifies the row on the table where it is the primary
key. If the column is also a foreign key, then that value must exist as the
primary key on another table. So in effect, both tables have the same
primary key, but one of the tables is the parent of the other table (parent
row must exist for each child in the other table).

This may not be proper 3rd normal form, but there are sometimes reasons for
having two tables with the same primary key.
 >> Stay informed about: FK versus PK 
Back to top
Login to vote
Mark C. Stock

External


Since: Dec 06, 2003
Posts: 31



(Msg. 4) Posted: Tue Feb 22, 2005 10:20 pm
Post subject: Re: FK versus PK [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"David Aldridge" wrote in message

 > It could also be the case that the column is only part of the primary
 > key and is also a foreign key ... that would probably be a more common
 > case.
 >

..... such as ORDER_ID and ITEM_NO as a 2-column PK in a dependent table
(ORDER_ITEMS dependent on ORDERS) with ORDER_ID being the FK to ORDERS

++ mcs
 >> Stay informed about: FK versus PK 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
OS Backup versus RMAN - Does anybody know where I could find a time comparison between an operating system backup and an RMAN backup? Thanks.

Required SAP CO & SAP CRM For DIRECT CLIENT; Email resumes.. - DIRECT CLIENT Requirement SAP CO & SAP CRM ; Email resumes to deepika@e-triune.com or Call 4082690061-113 1)REQUIRED-SAP CO (Controlling) functional-DIRECT CLIENT-Immediate Interview. 2)REQUIRED-SAP CRM with Service Contracts-DIRECT CLIENT-Immedia...

AQ and JMS Question - Hi, I am integrating with an application which uses a PL/SQL call specification as a method of extending the application. Ultimately I wont to put the parameter on a Queue (backed by Oracle AQ) and have it consumed by Message Driven Beans (which use JMS...

Possible use of a Cursor - I have a complex query that I hope I can explain it well enough for everyone to understand. I have a table that contains information for work instructions. Contained in the table are "MACHINE_PROC" these are groupings of machining processes....

sql query problem related to rownum. please help - i need to do a top-n query after doing a sorting using order by. the query i am using is as below select * from (select * from table order by colA,colB) where rownum < 100 i am having almost 1 lakh records in the table and because of the two levels...
   Database Help (Home) -> Oracle -> Server All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]