-2

What are the pros and cons of using a NoSQL database (like MongoDb, etc) entirely for a web application which is intended to be a social networking site. I mean, for the User accounts and other credentials to be stored in a NoSQL database, instead of using SQL like MySQL with Hibernate and totally relying on NoSQL, is it a good approach? If not, what are the trends in designing MySQL entities or domain objects (usually User accounts, etc) "bind" to a NoSQL database (which are usually posts, messages, etc.)?

4

1 回答 1

2

Here are the issues you should consider:

  • Latency

    NoSQL solutions are designed to do well here. They generally write data to memory which is flushed to the disk in batches. If the server crashes before it is written, the data might be lost. MongoDB has Journaling, which will help recovery from crashes. So no issues here

  • Reliability

    NoSQL solutions offer in-built solutions for replicating data. With MySQL, you'll have to do this yourself

For a social network scenario, document stores like MongoDB are a good idea for activity, comments related information. The user data can be stored in a MySQL database

于 2012-04-18T05:06:48.533 回答