publiclab / wherewebreathe

wherewebreathe.org
2 stars 7 forks source link

Storing user data #24

Closed mmnoo closed 10 years ago

mmnoo commented 10 years ago

[@jywarren asked why 2 databases are necessary, one for application data, the other for user data]

That may just be a convention (for better or worse) that I picked up somewhere.

Im not finding much documentation online detailing the argument for or against separating the users collection into a new Mongo db, so maybe it isnt a thing people do? I do know that an extra connection uses a bit more juice.

What do you think? I did manage to get through the problem of creating multiple connections, but it shouldn’t be a problem to rework the code to use stick users in the WhereWeBreathe db.

Do you think I've taken the modularity too far?

jywarren commented 10 years ago

I haven't done 2 databases in the past, as separating by table is plenty. Does it create problems for joining tables or anything? I'm not a big NoSQL person so i just don't have the background. It might be a good question for the plots-dev google group, as i think there are a variety of node devs living in there :-)

mmnoo commented 10 years ago

Either way, as I understand it, there arent joins with noSQL. One has to get the application itself to do the 'joins'. (Although, embedding/nesting documents inside other parent documents removes the need for joins, where that is practical... its probably not a solution in this context)

jywarren commented 10 years ago

ok yeah i guess that makes sense. And if we ever want to migrate to an sql db, we can just import it all into one db.

On Tue, Jul 15, 2014 at 2:58 PM, Melissa notifications@github.com wrote:

Either way, as I understand it, there arent joins with noSQL. One has to get the application itself to do the 'joins'. (Although, embedding/nesting documents inside other parent documents removes the need for joins, where that is practical... its probably not a solution in this context)

— Reply to this email directly or view it on GitHub https://github.com/publiclab/wherewebreathe/issues/24#issuecomment-49076983 .