Couchdb / Pouchdb模式设计 [英] Couchdb/Pouchdb schema design

查看:108
本文介绍了Couchdb / Pouchdb模式设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个管理潜在客户的应用程序。这些潜在客户分配给了一些合作者。他们使用平板电脑来联系我们的客户。移动应用程序具有离线支持,并与桌面应用程序同步。我有一些用户管理着这个合作者,他们需要从他们的合作者那里访问所有潜在客户。

I have an app that manages prospects. These prospects are assigned to some collaborators. They have a tablet that they use to contact our clients. The mobile app has offline support and syncs with the desktop app. I have some users that manages this collaborators and they need to have access to all prospects from their collaborators.

我们当前的设计是Cordova应用程序,它具有可同步的angular和pouchdb到couchdb。桌面应用程序是laravel应用程序。
我们为每个与移动应用程序帐户同步的协作者创建一个新的ouchdb数据库。
管理员和主管需要访问,列出和编辑所有Sofadb数据库的所有潜在客户。因此,我们通过一个nodejs进程,将ouchdb数据库上的所有潜在客户同步到mysql潜在客户表,以便我们可以轻松列出所有潜在客户。

Our current design is a cordova app, with angular and pouchdb that syncs to couchdb. The desktop app is a laravel app. We create a new couchdb database for every collaborator that syncs with their account on mobile app. The admins and supervisors needs to access, list and edit all prospects of all couchdb databases. So, we sync through a nodejs process, all prospects on couchdb databases to mysql prospects table, so we can easily list all prospects.

我的问题是这种设计是否有意义

My question is if this design makes sense or if we should go for another way.

也有类似的问题和设计此处

There is a similar question and design here

推荐答案

到为了提高安全性并减少与多个数据库进行同步的设计问题,我在文档中使用AES加密数据。对我来说,这是最好的解决方案。每个人都可以读取,但数据受到安全保护。

To increase security and decrease design problems with multiple databases to sync, I use AES encrypted data in documents. For me it is the best solution. Everyone can read but the data is securily protected.

这篇关于Couchdb / Pouchdb模式设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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