将简单的MySQL数据库转换为NoSQL解决方案 [英] Converting simple MySQL database to a NoSQL solution

查看:394
本文介绍了将简单的MySQL数据库转换为NoSQL解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很小的MySQL数据库,该数据库的主表大约有300条记录,偶尔也会添加更多.该表存储文件位置以及我的用户有权访问的视频资产的一些元数据. (电影标题,路径,关键帧名称,电影名称,文件名等)

I have a very small MySQL Database where the main table is about 300 records and I do add more occasionally. The table stores locations to files and some meta data for video assets that my users have access to. (movie title, path, keyframe name, movie name, file name, etc, etc)

我想将这张桌子转移到内存中的解决方案中,但是现在我对于这些选择以及真正最快,最轻巧,最划算的选择感到困惑.

I wanted to move this table to an in-memory solution, but I am confused now-a-days as to that options there are and what is really the fastest, lightest weight, best bang for the buck.

Redis? MongoDB?还有别的吗MySQL可以在内存中运行吗?

Redis? MongoDB? Something else? Can MySQL run in memory?

我正计划为不同的项目添加一些其他数据库.

I am planning on adding some other databases for different projects a well.

运行该工具的盒子是CentOS 5.6、16GB RAM,每天我的网站吸引大约100位访问者.

The box this runs on is CentOS 5.6, 16gb RAM and I get about 100 visitors to my site daily.

推荐答案

您需要问自己的第一件事是, 为什么要切换到NoSQL数据库?

The first thing that you need to ask yourself is, why do you want to switch to a NoSQL Database?

答案可能是:您需要更快的速度 复制和分布式数据库系统, 您需要更大的可扩展性以用于旧存储 或复制.或者你想受益 轻松开发.

Answers could be: You need more speed, you want a replicated and distributed database system, you need more scalability for used storage or replication. Or you want to benefit probably from easier development.

但是从300条记录中,我什么也没想到 最后会帮助你的.

But from 300 records i dont think any, but of the last would help you.

我不认为您真的想要内存中" 解决方案.内存中意味着仅写入所有数据 内存,如果您关闭数据库,那么您所有 数据丢失.如果您真的想要,那么MySQL 有一个内存存储引擎.

And i don't think that you really want an "in-memory" solution. In memory means every data only got written to ram, and if you close your database, then all your data is lost. If you really want that then MySQL have an in-memory Storage engine.

否则,所有数据库将缓存尽可能多的内存 尽其所能.并可能会完成300条记录 在您的ram中,也在MySQL下.你可能不明白 切换到NoSQL数据库可带来任何速度的好处.

Otherwise all database will cache as lot in-memory as it can. And 300 records will likely be completly in your ram also under MySQL. You probably don't get any speed benefits from switching to a NoSQL database.

如果您总体上计划切换到NoSQL数据库, 我更喜欢MongoDB.它是NoSQL和 和RDBMS,因为它为您提供了查询语言 几乎像SQL一样强大.你可以更好地称呼它 比RDBMS.对我来说,编程将是很多 针对无模式的数据库更容易.你可以 将MongoDB最多扩展到1000台服务器.

If you in general plan to switch to a NoSQL database, i would prefer MongoDB. It is a mix from NoSQL and and a RDBMS, because it give you a query language powerful nearly as SQL. And you can scall it better than RDBMS. And for me, programming will be a lot easier against a schema-free database. You can scale MongoDB up to 1000 servers.

但是其他NoSQL数据库具有更多的可伸缩性. 如果您需要更多服务器,则其他数据库将 probablby更好.但是您失去了查询您的方式的方法 数据.

But other NoSQL databases have a lot more scalability. If you need more Servers, then other databases would probablby better. But you lose some way to query your data.

如果您通常计划切换到NoSQL数据库 我认为MongoDB可以解决这个问题.其他NoSQL数据库 在某些特定情况下可能会更好,而不是 用于一般用途.

If you generally plan to switch to a NoSQL database i think MongoDB could handle this. Other NoSQL databases are probably better for some specific cases and not for general usage.

这篇关于将简单的MySQL数据库转换为NoSQL解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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