SQL Server和Firebase / PouchDB同步 [英] SQL Server and Firebase/PouchDB synchronization

查看:83
本文介绍了SQL Server和Firebase / PouchDB同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个Web应用程序,客户端在脱机时需要浏览器访问数据存储。我正在考虑使用Firebase或PouchDB数据库在应用程序内部实现此目的。

I am building a web application where the client needs browser access to data storage while offline. I'm thinking of using either a Firebase or PouchDB database to achieve this inside the application.

但是,对于后端,我正在使用SQL Server。我可以将Firebase / PouchDB中的数据同步到ms sql服务器引擎并永久存储吗?是MS SQL Server的JSON支持允许我执行此操作,还是我浪费时间沿着这条路线走?
正在使用Node.JS编写应用程序

However, for the back-end I am using SQL Server. Can I synchronize the data from Firebase/PouchDB over to ms sql server engine and store it persistently? Will MS SQL Server's JSON support allow me to do this or am I wasting my time going down this route? The application is being written using Node.JS

任何帮助/建议都很好。

Any help/advice would be great.

推荐答案

PouchDB是离线支持的绝佳选择!但是,您应该提供服务器端等效项,这样PouchDB才能发挥其真正的优势:复制。使用CouchDB(稳定可靠且经过验证的经过验证的原始),IBM Cloudant(兼容的数据库即服务)或PouchDB Server(正在兴起的新手,JavaScript中CouchDB的实现还很年轻)。

PouchDB is a great choice for offline support! You should provide a server-side equivalent, though, so PouchDB can play its real strength: replication. Use CouchDB (stable and proven, the battle-tested "original"), IBM Cloudant (compatible DB as a service) or PouchDB Server (the new kid on the block, an implementation of CouchDB in JavaScript, still young).

可能,然后尝试将数据从CouchDB导入SQL Server,但是您的真实来源应该始终是CouchDB,因为架构差异太多在两个数据库之间。将文档写入CouchDB就像API调用一样,因此我建议您尝试一下CouchDB!

You might then try to get the data from CouchDB into SQL Server, but your source of truth should always be CouchDB, as there are too many architectural differences between the two databases. Writing documents to CouchDB is just like an API call, so I suggest to give CouchDB a try!

这篇关于SQL Server和Firebase / PouchDB同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆