Recommended database backend for blog

不羁岁月 提交于 2019-12-24 03:21:52

问题


Greetings,

I'm building my personal website using php. My standard approach is to use MySQL as a database backend. I've been hearing a lot about document orienting databases and I'm wondering if these ( couchDB, mongoDB) might be a better option for me.

I understand that a low traffic site such as my personal homepage isn't going to see massive improvements from running a different DB, but I appreciate "the little things".

The database will primarily be holding textual data, such as comments and blog posts. Other than that I'll store some images.

So to sum up, can anyone give me a pros and cons, or other critique on using particular DB backends, most notably the newer document oriented one?

Thanks.


回答1:


Really, the most significant consideration is between relational databases (like MySQL) and document-oriented databases (like mongoDB). Compared to the differences between each class of database, the differences within each class are usually minor, especially for the application you're talking about.

My first recommendation is to use existing software, like WordPress. In that case, you'll want to use their backend, which is going to be a relational database.

If you're certain you want to reinvent the wheel, and you have a host which can accommodate it, I'd choose a document-oriented database. The major advantage is the loose schema; as you modify and add fields to the database you don't need to worry about modifying the data in the database--you can just deal with missing fields as they come up.



来源:https://stackoverflow.com/questions/3382639/recommended-database-backend-for-blog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!