推荐的博客数据库后端 [英] Recommended database backend for blog

查看:86
本文介绍了推荐的博客数据库后端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,

我正在使用php建立我的个人网站.我的标准方法是将MySQL用作数据库后端.我已经听到很多有关面向文档的数据库的信息,我想知道这些数据库(CouchDB,mongoDB)是否对我来说是一个更好的选择.

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?

谢谢.

推荐答案

确实,最重要的考虑是关系数据库(如MySQL)和面向文档的数据库(如mongoDB)之间.与数据库的每个类别之间的差异相比,每个类别之间的差异通常较小,尤其是对于您正在谈论的应用程序.

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.

我的第一个建议是使用现有软件,例如 WordPress .在这种情况下,您将需要使用它们的后端,它将成为一个关系数据库.

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.

这篇关于推荐的博客数据库后端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆