Board index » delphi » Database Replication using dial up clients and Paradox tables - Help Please

Database Replication using dial up clients and Paradox tables - Help Please

We will have several dialup clients to our Windows NT LAN. Each of these
clients will need to update at least one of their tables from the LAN
and two or more LAN tables will be updated from the clients. Are there
some "simple" methods to synchronize this database? Any software
available?

Thanks for your help. Please also send email in addition to a post.

Jim Berry
p...@xroads.com

 

Re:Database Replication using dial up clients and Paradox tables - Help Please


Quote
pmdc wrote:

> We will have several dialup clients to our Windows NT LAN. Each of these
> clients will need to update at least one of their tables from the LAN
> and two or more LAN tables will be updated from the clients. Are there
> some "simple" methods to synchronize this database? Any software
> available?

> Thanks for your help. Please also send email in addition to a post.

> Jim Berry
> p...@xroads.com

I second that but need info for dBase files.

Magnus

Re:Database Replication using dial up clients and Paradox tables - Help Please


Quote
> > We will have several dialup clients to our Windows NT LAN. Each of
these
> > clients will need to update at least one of their tables from the LAN
> > and two or more LAN tables will be updated from the clients. Are there
> > some "simple" methods to synchronize this database? Any software
> > available?

> I second that but need info for dBase files.

I've considered doing something like this in the past but the need
evaporated.  I don't know of any 'automatic' software that does this (not
that I've looked <g>).

Here are some basic principles that came to my mind at the time:

1. Use blocks of unique ID's for each client app for new records, much like
ISP's (etc) get blocks of IP's from InterNIC.
2. Use extra fields in each table to track when each record is added or
modified, and by whom.  I might even include a flag field that indicates
that an unreconciled change exists.
3. Relegate deleted records to tables of deleted records.
4. Write a reconciliation program that processes the deletions against the
master database tables and then comb the client app's tables for
changed/new records and attempt to merge them with the master tables.  Note
that this essentially applies the same principles as Delphi
TTable.UpdateMethod property (WhereAll, WhereChanged, IndexOnly).  Any
conflicts would need to be resolved by a user I guess.
5. After reconciliation, give the client app a new copy of the entire
database.

As a recent article (can't remember where) said, data replication is a big
and rather difficult subject with many different implementations (the big
RDBMS's, MS Access, Lotus Notes).  I don't know how sophisticated your
needs are;  a simple reconciler program may be all you need, or you may
need to add extra system fields to tables (like Access uses, for example)
and specifically modify your applications to account for replication.

I look forward to reading the suggestions of others - it's a fascinating
problem!

Hope this helps,

Boris Bosnjak
Software Craftsman
DreamQuest Canada

Re:Database Replication using dial up clients and Paradox tables - Help Please


Hello,
I've used dbSynchro for Foxpro to synchronize databases. dbSyncrho comes in
both xBase and Delphi flavors. A word of caution: Synchronizing databases
is not a trivial undertaking.
Here's the latest address I have for the publisher:
AboveBoard Systems
20 Wellfleet Bay
Alameda, CA 94502 USA
Voice: 510-337-9081
Fax: 510-337-9082
e-mail 76152.2...@compuserve.com

Regards,
Walt Miller

Magnus Wikegard <wikeg...@mbox300.swipnet.se> wrote in article
<32544FDA.6...@mbox300.swipnet.se>...

Quote
> pmdc wrote:

> > We will have several dialup clients to our Windows NT LAN. Each of
these
> > clients will need to update at least one of their tables from the LAN
> > and two or more LAN tables will be updated from the clients. Are there
> > some "simple" methods to synchronize this database? Any software
> > available?

> > Thanks for your help. Please also send email in addition to a post.

> > Jim Berry
> > p...@xroads.com

> I second that but need info for dBase files.

> Magnus

Re:Database Replication using dial up clients and Paradox tables - Help Please


Quote
>Magnus Wikegard <wikeg...@mbox300.swipnet.se> wrote in article
><32544FDA.6...@mbox300.swipnet.se>...
>> pmdc wrote:

>> > We will have several dialup clients to our Windows NT LAN. Each of
>these
>> > clients will need to update at least one of their tables from the LAN
>> > and two or more LAN tables will be updated from the clients. Are there
>> > some "simple" methods to synchronize this database? Any software
>> > available?

>> > Thanks for your help. Please also send email in addition to a post.

>> > Jim Berry
>> > p...@xroads.com

>> I second that but need info for dBase files.

>> Magnus

I'm planning on implementing simple replication for my Delphi Project
using Paradox.  Here are some quick notes on my planned implementation.

1. Primary keys are now a composite of a Long integer ("ID") and a
   Character ("Pub") field. (i.e. I + A5).  the "Pub" field represents the
   a physical location of the database changes.
    ==> autoincrement Fields are out.
        For New Records I is (as with Autoincrement Fields) 1 greater
        than the last used values.
        The "Pub" field prevents key violations for records inserted
        at different locations.

2. Each table also has "LastPub" and a TimeStamp Field Added.

3. on the afterpost/AfterDelete Events for each table changes will be
   logged in a table with the following structure.
       - Timestamp
       - TableName
       - ID/Pub of affected record
       - Action (i.e.Post/Delete)
       - New fieldValues
           As the Structure of my tables will not change then Field Values
           will be a a Memo Field with the New values in order separated
           by a "|"

4. This log table will be transferred to the "Main" database where I will
   check for conflicts and then apply changes.  

5. Conflicts can be found by combining the log tables, sorting by
   TableName, ID/Pub and looking for duplicates.  

6. Once these updates have performed from the remote databases the log
   table from the Main database will be sent to update the remote databases.

7. Any conflicts will be printed in a report and will probably be in favor
   of the values in the Main database.

8. If a conflict is resolved in favor of the Main database, this change must
   be added to the log table returned to the remote site.

The replication is not a priority in my project. However, I will be
spending more time on this later.  As I am only on step 2,
Any thoughts or comments would be appreciated.

Does anybody want to share the programming/testing for a replication module????

Glenn
-------------------------------------------------------------------------------
Glenn Chong                        |    Having a smoking and non-smoking
Professional Student               |    section in a restaurant is like
KR-2S (on a budget) in progress    |    having a urinating and non-urinating
GL...@STARFIRE.UTIAS.UTORONTO.CA   |    section in a pool.
-------------------------------------------------------------------------------

Re:Database Replication using dial up clients and Paradox tables - Help Please


There is a white papaer that has a good explanation how Microsoft
achieves replication under Access95 on their www site. I can't
remember the actual name of the file but it is their.  It is a workd
document.

Maybe you might look at going to Access 95, as it has it all built in.

Hope this helps.

Quote
pmdc <p...@xroads.com> wrote:
>We will have several dialup clients to our Windows NT LAN. Each of these
>clients will need to update at least one of their tables from the LAN
>and two or more LAN tables will be updated from the clients. Are there
>some "simple" methods to synchronize this database? Any software
>available?
>Thanks for your help. Please also send email in addition to a post.
>Jim Berry
>p...@xroads.com

Other Threads