Unix Technical Forum

Foreign Key / Auto Increment

This is a discussion on Foreign Key / Auto Increment within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Is it ok to reference an auto-increment column (of parent table) as a foreign key in a child table?...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 05:31 AM
Nouman Shah
 
Posts: n/a
Default Foreign Key / Auto Increment

Is it ok to reference an auto-increment column (of parent table) as a foreign key in a child table?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 05:31 AM
Mark D Powell
 
Posts: n/a
Default Re: Foreign Key / Auto Increment

If by auto_increment column you mean sequence generated key value then
yes it would be fine to reference the PK of the parent table from the
child table. In the case of an inherited key in the child table how
else would you do it?

HTH -- Mark D Powell --

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 05:31 AM
DA Morgan
 
Posts: n/a
Default Re: Foreign Key / Auto Increment

Nouman Shah wrote:

> Is it ok to reference an auto-increment column (of parent table) as a foreign key in a child table?


There is no such thing as an autoincrement column in Oracle.
Please provide the following:

1. Name of product and version you are using
2. Describe of the table in question

But likely the answer, in any database product, is that a reference
or SELECT can do no harm.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com