MongoDB or couchDB for Social Networking websites? [closed]
Im so impressed with nosql DB's and really wish to use MongoDB for my application,
But i feel like its limited for joins [joining 3 or 4 tables], union kinda things.
Is it possible to use MongoDB for social networking sites like Tagged,FB etc..
no idea about couchDB... any one guide me through,
Thanks,
Edvin
You can use MongoDB for any application, of course. However, if you're concerned about lack of ability to do things like joins then you should seriously consider sticking with SQL based solutions.
MongoDB is not a relational database management system. Thinking in terms of joins and other common relational concepts is not something that's particularly well suited for noSQL. MongoDB is substantially more "hybrid" or "SQLish" in the sense that it will allow you to do some form of cross document querying, but in practice it should be avoided in preference to rethinking the way you model your data.
The most common (and best) practice in most situations for a document-oriented database like MongoDB is to simply embed the documents. There's a nice write up on the mongo site about schema design to help you think about the difference between embedding and referencing documents.
noSQL can be a very powerful tool, but you should think carefully about how your data fits the noSQL model before implementing. And, make sure you think through the pros and cons of using one database solution over another.
Yes why not, it can be clustered or replicated with other datacenters.
And its very fast.. only you if you want to use auto incremental id's you have to use something like twitters snowflake..
For the joins you can use data models to create the join with 3 or 4 queries
精彩评论