试试MongoDB或坚持使用MySQL

时间:2023-01-23 08:47:23

I am coding a web portal which stores a lot user data and later on maybe documents. In the meantime I use MySQL with many relations. I have read much about NoSQL and find that it is an interesting topic.

我正在编写一个Web门户网站,它存储了大量用户数据,后来又存储了文档。与此同时,我使用MySQL与许多关系。我已经阅读了很多关于NoSQL的内容,并发现这是一个有趣的话题。

Is MongoDB or CouchDB ready to fully replace MySQL? Would something change in the usage of Doctrine in my application?

MongoDB或CouchDB是否已准备好完全取代MySQL?在我的应用程序中,Doctrine的使用会发生什么变化吗?

1 个解决方案

#1


5  

Is MongoDB or CouchDB ready to fully replace MySQL?

MongoDB或CouchDB是否已准备好完全取代MySQL?

Sure, lots of people are storing their entire data set in MongoDB instead of MySQL and they are doing fine.

当然,很多人将他们的整个数据集存储在MongoDB而不是MySQL中,他们做得很好。

But I do not think that is the correct question. The key questions are really the following:

但我不认为这是正确的问题。关键问题实际上如下:

  • Does implementing MongoDB improve your system? Less queries, more flexibility, better performance?
  • 实现MongoDB是否可以改善您的系统?减少查询,提高灵活性,提高性能?

  • Are you capable of implementing MongoDB at the appropriate scale?
  • 您是否有能力以适当的规模实施MongoDB?

MongoDB is a tool like many others and it does not solve all problems. In my experience, most systems are best implemented with some mix of databases. That would means something like MongoDB for some data and SQL for other data.

MongoDB是一个像许多其他工具一样的工具,并不能解决所有问题。根据我的经验,大多数系统最好用一些混合数据库来实现。这意味着某些数据的MongoDB和其他数据的SQL。

#1


5  

Is MongoDB or CouchDB ready to fully replace MySQL?

MongoDB或CouchDB是否已准备好完全取代MySQL?

Sure, lots of people are storing their entire data set in MongoDB instead of MySQL and they are doing fine.

当然,很多人将他们的整个数据集存储在MongoDB而不是MySQL中,他们做得很好。

But I do not think that is the correct question. The key questions are really the following:

但我不认为这是正确的问题。关键问题实际上如下:

  • Does implementing MongoDB improve your system? Less queries, more flexibility, better performance?
  • 实现MongoDB是否可以改善您的系统?减少查询,提高灵活性,提高性能?

  • Are you capable of implementing MongoDB at the appropriate scale?
  • 您是否有能力以适当的规模实施MongoDB?

MongoDB is a tool like many others and it does not solve all problems. In my experience, most systems are best implemented with some mix of databases. That would means something like MongoDB for some data and SQL for other data.

MongoDB是一个像许多其他工具一样的工具,并不能解决所有问题。根据我的经验,大多数系统最好用一些混合数据库来实现。这意味着某些数据的MongoDB和其他数据的SQL。