Kevin

I'd go for a 'keep it simple' approach.

First, create three data files on UniData: SYNC_TARGETS, SYNC_ACTIONS and
SYNC_ERRORS.

- The SYNC_TARGETS defines a table or entity to update, including insert and
delete commands (Update=delete+insert) and a list of column positions to
substitute. This may seem overkill but it allows you to format the SQL the
way you want, and possibly specify stored procedures (AFAIK MySQL 5 has
stored procedures but I haven't used them yet) 

- The SYNC_ACTIONS holds the actions, each specifying a target, action type
(update,insert,delete) and a list of fields that match the column positions
specified in the target.

- The SYNC_ERRORS logs errors.

How you populate the action is then up to you: using triggers, virtual
secondary index fields or whatever...

Then, write a simple VB/Delphi/.NET/VBScript app with a UO connection to:

- load up the targets for reference
- select the actions (on a timer loop) sorted by target (so you get
advantages of query preparation and caching - it is worth not making the
timer interval too short)
- prepare insert and delete ADODB commands on each change of target
- substitute the parameters and fire the delete and/or insert commands as
required

It means having a Windows box in the middle, but the route is well known.
Any failure just means the actions accumulate until drained.

I have a working example I can dig out and send you.

Brian



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Kevin King
> Sent: 29 July 2006 03:12
> To: [email protected]
> Subject: RE: [U2] Replication Between Unidata and MySQL
> 
> >From: Of Mike Randall
> >Sent: Friday, July 28, 2006 5:46 PM
> >...The trigger could normalize your data (or whatever you 
> needed done) 
> >and could be added with no impact to your application.
> 
> I wouldn't say "no impact" per se but I think the trigger 
> idea has merit overall as a minimally invasive change 
> watcher.  But then what?
> What's the best way to get the deltas into the MySQL instance?
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to