couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wout Mertens <>
Subject Re: Best performing login implementation?
Date Mon, 06 Sep 2010 14:18:58 GMT

On Sep 6, 2010, at 15:39 , Tiago Freire wrote:

> I am wondering about the best method for
> implementing this.
> 1) Each username+login in a document.
> 2) One document for username+logins, each one in a separate property.
> {username:password}
> 3) One document for username+logins, all in a single 'logins' array.
> {logins: [{username:foo, password: bar}]}

From general principle, 1) is the one you want. I haven't set up user auth myself, but in
document-oriented databases you want to keep your data together in logical units that have
a practical maximum size.

So while, in a way, all your logins are a logical unit, there is no limit on how large that
array will get so that is not a good way to store that information.

View raw message