You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by 明 淨 <ji...@outlook.com> on 2018/04/26 10:50:43 UTC

答复: 答复: Some questions about couchdb




Thank you for providing the information.





________________________________
From: Martin Broerse <ma...@gmail.com>
Sent: Thursday, April 26, 2018 2:38:41 PM
To: user@couchdb.apache.org
Subject: Re: 答复: Some questions about couchdb

Perhaps also take a look at the https://bloggr.exmer.com exampe to see
CouchDB & PouchDB in action (https://github.com/broerse/ember-cli-blog)

On Thu, Apr 26, 2018 at 4:26 AM, 明 淨 <ji...@outlook.com> wrote:

>
>
> Thank you, I will check Pouchdb.
>
>
>
>
>
> ________________________________
> From: Bill Stephenson <bi...@cherrypc.com>
> Sent: Thursday, April 26, 2018 9:37:42 AM
> To: user@couchdb.apache.org
> Subject: Re: Some questions about couchdb
>
> Hi Jinmin,
>
> > On Apr 25, 2018, at 7:11 PM, 明 淨 <ji...@outlook.com> wrote:
> >
> > What I'm thinking about is the following things:
> >
> > 1. If I store the info of a person as a document in couchdb, will update
> of a few words in his/her self introduction cause the whole document to be
> rewrite? also, I have to submit the whole document to make this a few words
> update? Shall couchdb support field unit update in the future?
>
> In a nutshell yes, you will update the entire document but that’s easy.
> You “get” the document as a JSON object and then update just the parts of
> the object you want and then “put” the updated document object back in the
> database.
>
> >
> > 2. By default, a user of a database in couchdb can update all the
> documents in the database, but usually in the real world, every document
> has it's owner, and shouldn't be updated by users other than the owner. Is
> there any mechanism in couchdb to support document unit authorization?
>
> With CouchDB you can set it up so every user has their own database that
> only they can create, modify, and delete documents in. You can assign other
> users “roles” and add them to a database's “Permissions” that allow them to
> only read documents in a database as well.
>
> >
> > 3. As replication is the basis of data sync across cluster nodes, so
> will couchdb support field unit update in cluster data sync, not just
> document unit?
>
> I don’t know the answer to this, but I do know you can replicate and sync
> databases between more than one CouchDB server. You don’t need a cluster to
> do that though.
>
> I will suggest you take a look at PouchDB too. The info on their site will
> help you get a feel for some of the ways you can manage users and documents
> and permissions and you can use PouchDB in your web browser offline without
> a CouchDB server, and you can sync your web browser database with a remote
> CouchDB server, or just use PouchDB with a remote CouchDB server.
>
> https://pouchdb.com
>
> Also check out their “Authentication” plugin page to learn more about how
> you can manage users and database permissions on your CouchDB:
>
> https://github.com/pouchdb-community/pouchdb-authentication/blob/master/
> docs/recipes.md
>
> I hope this helps,
>
> Bill
>