Richard,
It depends on the version of Oracle used for the
snapshot site. O7 snapshots do not support PK or
unique constraints because Oracle doesn't guarantee
that the records will be refreshed in the same order
as the DML operations were performed on the master
table, only that after refresh the rows will be the
same. You can create indexes on the O7 snapshots,
just not unique indexes. With the introduction of
deferrable constraints in O8, PK and unique
constraints are supported on snapshots as long as they
are created DEFERRABLE.
BTW, this is relevant only to updateable snapshots.
If you have read-only snapshots there's no point in
having a PK constraint on the snapshot as DML
operations aren't allowed on it anyway. You guarantee
RI among snapshots by refreshing them together via
refresh groups.
HTH,
- Anita
- Richard Ji <richard_at_letsplay.com> wrote:
> Hi all,
> I am planning to setup the following: a staging
> database STAGE and a live
> database LIVE. Some tables in the LIVE database are
> just regular tables
> (that will get its data directly from web site)
> others are snapshots from
> the STAGE database. The reason for that is for
> those tables we can enter
> data into it's STAGE's master table and after QA it
> then can be released
> into LIVE via snapshot refresh.
> So my question is: For those snapshots in the LIVE
> database, can I have
> referential integrity to it. For example, if DEPT
> is a snapshot in LIVE,
> can EMP has a foreign key to DEPT in the LIVE?
> Thanks.
>
> Richard Ji
>
>
> --
> Author: Richard Ji
> INET: richard_at_letsplay.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
Received on Wed May 31 2000 - 07:00:56 CDT