This is close, but I don't think it would scale up well. I'm looking at doing the equivalent of adding many hundreds of permissions. Building a big long list doesn't seem very efficient. But maybe it is in the CouchDB world. I don't know.
Also, it requires a two step process to work. When you add a new user you would have to create the new document for the user and then update the group document to add them to the list. It seems cleaner to me to just create the user with their group specified in the user document. But that may just be a personal preference. -----Original Message----- From: Sebastian Cohnen [mailto:[email protected]] Sent: Tuesday, October 27, 2009 4:10 PM To: [email protected] Subject: Re: How Do You Model This? Without having read all your post (sry), I found this a few days ago: http://kore-nordmann.de/blog/couchdb_a_use_case.html On 27.10.2009, at 21:07, Welch, Matt wrote: > Ok, forgive my table structured background. I'm trying to see the > light, here, but I need help converting an SQL table based model into > something more CouchDB-ish. In an old-fashioned relational database it > would look similar to this: a users table and a permissions table. > > Users: > > Name Group > ----------------- > Alice Developers > Bob Developers > Carol Developers > Eve Managers > Frank Managers > > Permissions: > > Group Directory > --------------------- > Developers Source > Developers Binary > Managers Binary > Managers Planning > > Then I want to look up what directories Alice has permissions to, or > even make a master list of all the users and their permissions like: > > Alice Source > Alice Binary > Bob Source > Bob Binary > ... > Frank Binary > Frank Planning > > I need to do the equivalent of adding and removing users, adding and > removing directories, and change group and permission assignments. > None > of that can be static. > > So how do I set up my data and views in CouchDB to do this kind of > thing? Or is this just not the sort of thing CouchDB will be good at > modeling? > > Thanks in advance for your help. > > > The contents of this e-mail are intended for the named addressee > only. It contains information that may be confidential. Unless you > are the named addressee or an authorized designee, you may not copy > or use it, or disclose it to anyone else. If you received it in > error please notify us immediately and then destroy it. >
