我几天前听说过cassandra数据库引擎,并正在寻找有关它的良好文档。在研究cassandra之后,我发现cassandra比其他数据引擎更具可伸缩性。
我还阅读了Amazon SimpleDB,但由于SimpleDB的限制为每张表10GB,并且Google Datastore的速度比Amazon SimpleDB慢,所以我不想使用它们(Google Datastore,Amazon SimpleDB)。因此,为了使我们的网站具有海量数据的超高写入率,我喜欢将Cassandra用作我们的数据引擎。

但是在开始使用cassandra之前,我对“如何使用casssandra处理复杂数据”感到困惑。我在下面提供了MySQL数据库结构,请仔细阅读并给我一个很好的建议。

用户表
hasColum ID主要
hasColum电子邮件唯一
hasColum名字
hasColum姓氏

分类表
hasColum ID主要
hasColum parent
hasColum类别

帖子表
hasColum ID主要
hasColum UID索引外键链接到用户-> ID
hasColum CID索引外键链接到Category-> ID
hasColum标题
hasColum Post Index
hasColum PunDate

评论
hasColum ID主要
hasColum UID索引外键链接到用户-> ID
hasColum PID索引外键链接到Posts-> ID
hasColum评论

用户组
hasColum ID主要
hasColum名称

UserToGroup表(仅用于多对多关系)
hasColum UID外键链接到用户-> ID
hasColum GID外键链接到Group-> ID

最后供您参考,我喜欢使用SimpleCassie PHP类http://code.google.com/p/simpletools-php/
因此,如果您可以使用SimpleCassie给我示例,这将非常有帮助

最佳答案

来自cassandra's wiki data model reference:
好的文章ojita。
希望对您有帮助。

09-25 19:24