Re: How are foreign keys stored in 7.1?
Date: 1995/07/11
Message-ID: <3tv0vi$b3i_at_hpcc48.corp.hp.com>#1/1
Steve Ehlke (sehlke_at_cts.com) wrote:
: I need to find out how foreign keys are stored in a table. Does
: Oracle make a copy of the other tables primary key, or does it use a
: pointer of some sort like ROWID? Eample: If Table A's primary key is
: 50 bytes and table B uses this as a foreign key, is 50 bytes used for
: storing the foreign key?
Oracle FK are business rules stored in the database. It doesn't necessarily require any more space than without FK (with the exception of a little space in the data dictionary to store the FK rule).
however, if you want good perf in your joins using the FK to PK columns, it would be wise to create an index on the FK, and any index in Oracle will require space. How much space depends on the column(s) you are indexing. There's some formula in the DBA Server Admin guide on calculating index space.
Johnny Chan
Independent Oracle Specialist
Received on Tue Jul 11 1995 - 00:00:00 CEST