Home  >  Article  >  Backend Development  >  使用yii2-mongodb在YII2里面主要起到提升哪一块的性能呢?

使用yii2-mongodb在YII2里面主要起到提升哪一块的性能呢?

WBOY
WBOYOriginal
2016-06-06 20:37:42795browse

使用yii2-mongodb在YII2里面主要起到提升哪一块的性能呢?

回复内容:

使用yii2-mongodb在YII2里面主要起到提升哪一块的性能呢?

mongodb 是nosql
mysql 是传统的db
至于性能提升这个不好比较,看你开发的应用,是nosql方便还是传统db方便

mongo 是一种nosql数据库,至于yii封装的yii2-mongodb 应该是一种扩展类库,就好像你框架中的已经封装好的mysql类库一致。应用起来都会更方便,更简捷。

不建议yii使用mongodb,毕竟yii是用来对付关系型数据库的。我用过yii2-mongodb,连最基本的文档嵌套都做不了,比如说这样的:$model->folder->file->attribute,结论就是能用关系型的还是尽量用关系型吧。

如果非要用mongodb的话,建议考虑node.js,不要用php了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn