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.
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
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.
来源:https://stackoverflow.com/questions/32904596/couchdb-pouchdb-schema-design