Apart from graphical features, online games should have a simple Relational Database structure. I am curious what database do online games like Farmville and MafiaWars use?

除了图形功能,在线游戏应该有一个简单的关系数据库结构。我很好奇像Farmville和MafiaWars这样的在线游戏使用什么数据库?

Is it practical to use SQL based databases for such programs with such frequent writes ?
If not, how could one store the relational dependence of users in these games?

使用基于SQL的数据库进行频繁写入的程序是否切实可行?如果没有,那么如何在这些游戏中存储用户的关系依赖性呢?

EDIT: As pointed, they use NOSQL databases like Couchbase. NOSQL is fast with good cuncurrency (which is really needed here); but the sotrage size is much larger (due to key/value structure). 1. Does't it slow down the system (as we need to read large database files from the disk)? 2. We will be very limited as we do not have SQL's JOIN to connected different sets of data.

编辑:正如所指出的,他们使用像Couchbase这样的NOSQL数据库。 NOSQL速度快,具有良好的功能(这里真的需要);但是sotrage的规模要大得多(由于键/值结构)。 1.它是否会降低系统速度(因为我们需要从磁盘读取大型数据库文件)? 2.我们将非常有限,因为我们没有SQL连接来连接不同的数据集。

3 个解决方案

#1


3

To Answer your edit:

要回答你的编辑:

You can decrease storage size by using a non key=>value storage like MongoDB. This does still have some overhead but less than trying to maintain a key=>value store.

您可以使用非密钥=>值存储(如MongoDB)来减小存储大小。这仍然有一些开销,但比尝试维护key => value存储更少。

It does not slow down the system terribly since quite a few NoSQL products are memory mapped which means that unlike SQL it doesn't go directly to disk but instead to a fsync queue that then writes to disk when it is convient to. For those NoSQL solutions which are not memory mapped they have extremely fast read/write speeds and it is normally a case of trade off between the two.

由于相当多的NoSQL产品是内存映射的,因此它不会对系统造成太大的影响,这意味着与SQL不同,它不会直接转到磁盘,而是直接转移到fsync队列,然后当它很方便时写入磁盘。对于那些没有内存映射的NoSQL解决方案,它们具有极快的读/写速度,通常情况下两者之间需要权衡。

As for JOINs, it is a case of arranging your schema in such a manner that you can avoid huge joins. Small joins to join say, a user with his score record are fine but aggregated joins will be a problem and you will need to find other ways around this. There are numerous solutions provided by many user groups of various NoSQL products.

至于JOIN,这是一种以你可以避免巨大连接的方式安排你的模式的情况。加入的小连接说,具有他的得分记录的用户很好,但聚合连接将是一个问题,你需要找到其他方法来解决这个问题。各种NoSQL产品的许多用户组都提供了许多解决方案。

更多相关文章

  1. SQL SERVER 2005 数据库对比工具,并自动生成更新SQL脚本
  2. C# 往SQL数据库插入listbox的值
  3. C#使用SqlBulkCopy将DataTable写入数据库的表中(表不存在则创建新
  4. 高分求解:如何每天将本地的sybase的数据导入到internet上的sql se
  5. MySQL数据库阶段学习目录
  6. [置顶] Android数据库框架GreenDao封装使用,易理解、易扩
  7. Android原生Contacts——界面和数据库
  8. [Android]如何导入已有的外部数据库
  9. Java操作数据库之jdbc【原生方式】

随机推荐

  1. php比Node.js好用的五大理由
  2. php如何使用PHPAnalysis提取关键字中文分
  3. 简单的php多线程解决方法
  4. 教你用PHP实现微信小程序人脸识别刷脸登
  5. 谈一谈php面向对象的理解
  6. php实现文件上传到服务器(含代码)
  7. 十大最主流的PHP框架
  8. 新手应该知道的php多图片上传的实现
  9. php构建一个区块链(含源码)
  10. PHP global 关键词的实例详解