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: Replication and Table Design

Re: Replication and Table Design

From: <ahasanas_at_my-dejanews.com>
Date: Fri, 02 Apr 1999 09:46:12 GMT
Message-ID: <7e23l4$1k9$1@nnrp1.dejanews.com>


Hi,

You asked for two things - a normal solution and a better data locality. Then think relationally. Just redefine your primary key. Add another column called site (for east-cost assign a value 1, west-coast assign a value 2 etc.) and make your primary key a combination of site and rec_id. The solution is relational and futureproof. For additional sites you do not have to change your sequence range, just add another site_id (3 for Asia etc.). You may have another site table which is the parent table. Hope the changes in your database will not be great.

Asif Hasan
spectrum_at_bangla.net

In article <37042efe.9157567_at_nntp.ix.netcom.com>,   shmulik_at_ix.netcom.com (Shmuel Cohen) wrote:
> I currently have a database schema that includes sequences, i.e.,
>
> create Table XX
> (
>
> rec_id NUMBER
>
> )
>
> create sequence table_XX_seq ...
>
> When record are inserted, each record is given the nextval sequence
> number as it's rec_id - so far, so good. I now need to create both an
> east-coast and west-coast version to provide better data locality - my
> question is: If I apply "loose consistency", that is , asynchronous
> replication of the data (each coast can receive new records for
> insertion in the database) - how can I keep the data synchronized
> properly? If the rec_id is a key field, then potentially, both coasts
> could accept an update during the "loose" period - assign the same
> value to the rec_id field, and then when the system does it's periodic
> replication, I'd have multiple records with the same rec_id -
> violating the DB integrity. What are the normal solutions around
> this?
>
> TIA
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Apr 02 1999 - 03:46:12 CST

Original text of this message

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