[英]Synchronize between an MS Access (Jet / MADB) database and PostgreSQL DB, is this possible?
Is it possible to have a MS access backend database (Microsoft JET or Access Database Engine) set up so that whenever entries are inserted/updated those changes are replicated * to a PostgreSQL database? 是否可以设置MS访问后端数据库(Microsoft JET或Access数据库引擎),以便每当插入/更新条目时,这些更改都会复制*到PostgreSQL数据库?
Two-way synchronization would be nice, but one way would be acceptable. 双向同步会很好,但有一种方法是可以接受的。
I know it's popular to link the two and use one as a frontend, but it's essential that both be backend. 我知道将两者联系起来并将其作为前端使用是很受欢迎的,但两者都必须是后端。
Any suggestions? 有什么建议么?
* ie reflected, synchronized, mirrored *即反射,同步,镜像
Can you use Microsoft SQL Server Express Edition ? 你能使用Microsoft SQL Server Express Edition吗? Or do you have to use Microsoft Access Database Engine ?
或者您必须使用Microsoft Access数据库引擎 ? It's possible you'll have more options using MS SQL express, like more complete triggers and logging.
您可以使用MS SQL Express获得更多选项,例如更完整的触发器和日志记录。
Either way, you're going to need a way to accumulate a log of changed rows from the source database engine, and a program to sync them to PostgreSQL by reading the log and converting it into suitable PostgreSQL INSERT
, UPDATE
and DELETE
statements. 无论哪种方式,您将需要一种方法来累积源数据库引擎中已更改行的日志,以及通过读取日志并将其转换为合适的PostgreSQL
INSERT
, UPDATE
和DELETE
语句来将它们同步到PostgreSQL的程序。
You could do this by having audit triggers in MADB/Express insert a row into an audit shadow table for every "real" table whenever it changed, including inserting special "row deleted" audit entries. 您可以通过让MADB / Express中的审计触发器在每次更改时为每个“真实”表插入一行到审计影子表中来执行此操作,包括插入特殊的“行删除”审计条目。 Then your sync program could connect to both MADB/Express, read the audit tables, apply the changes to PostgreSQL, and empty the audit tables.
然后,您的同步程序可以连接到MADB / Express,读取审计表,将更改应用于PostgreSQL,并清空审计表。
I'll be surprised if you find anything to do this out of the box. 如果您发现任何可以开箱即用的东西,我会感到惊讶。 It's one area where Microsoft SQL Server has a big advantage because of all the deep Access and MADB engine integation to support the synchronisation and integration features.
这是Microsoft SQL Server具有巨大优势的一个领域,因为所有深入的Access和MADB引擎集成都支持同步和集成功能。
There are some ETL ("Extract, Transform, Load") tools that might be helpful, like Pentaho and Talend . 有一些ETL(“提取,转换,加载”)工具可能会有所帮助,比如Pentaho和Talend 。 I don't know if you can achieve the desired degree of automation with them though.
我不知道你是否能用它们达到理想的自动化程度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.