Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to implement relationships between tables

Re: How to implement relationships between tables

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 11 Apr 2003 11:24:22 -0700
Message-ID: <130ba93a.0304111024.eb304bf@posting.google.com>


In SQL server you use the IDENTITY column to automatically generate a sequential number when a new record is inserted into the table. In ORACLE you need to use TRIGGER and SEQUENCE to support such functionality. You can "reseed" the SQL server IDENTITY if you have to - say, if you truncate the table. With ORACLE, you can drop and recreate the sequence, or you can manipulate the "increment" to get the sequence back to the desired value.

"Sönke Petersen" <sk.petersen_at_gmx.de> wrote in message news:<b76d6p$9l1$1_at_news.mch.sbs.de>...
> Hello there,
>
> I must admit most knowledge about databases comes from working with MS
> Access.
> I understood that relationships between between tables are implemented by
> constraints: foreign keys etc.
>
> But I have to deal with these keys also on an application level.
> Or do I not?
>
> For example: if I use an ordinary integer value as primary and foreign key
> to implement
> a relationship. Is there an autoincrement operation if one executes an
> update operation
> on one of the tables?
>
> How can I define such an autoincrement?
>
> A similar question arises in the case of deleting records. What if I delete
> records with the
> highest used integer values. Does Oracle track the used counters?
>
> So there a lot more questions I have and I'd like to ask you around here if
> there is info
> which describes in a detailled manner the implentation of relationships
> within Oracle.
>
> Regards,
> Sönke
Received on Fri Apr 11 2003 - 13:24:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US