基于MongoDB的结构化存取方法研究-软件工程专业论文.docxVIP

  • 16
  • 0
  • 约6万字
  • 约 63页
  • 2019-02-13 发布于上海
  • 举报

基于MongoDB的结构化存取方法研究-软件工程专业论文.docx

基于MongoDB的结构化存取方法研究-软件工程专业论文

武汉理 武汉理工大学硕士学位论文 万方数据 万方数据 摘要 随着 Web2.0 兴起,关系数据库面临海量、高并发、高扩展性的数据的挑战, 非关系型数据库 NoSQL 能够很好地解决这些问题。MongoDB 作为一种典型的 NoSQL,但是 MongoDB 处理较复杂的关系操作性能不好。本论文研究 MongoDB 数据结构化存取,便于多文档之间的复杂关系操作。MongoDB 数据结构化存取, 是将数据之间的关系按照一定的数据结构存储在数据库中,并且在数据模型上 进行关系操作。MonogDB 官方文档对于一对一、一对多和树形结构的数据分别 给出了多种关系模型,有很多的问题,如其中一对多模型没有考虑数据模型的 适用场景,没有提出多对多的数据模型等问题。为了解决上述问题,本文主要 做了如下工作: (1)改进和补充 MongoDB 结构化存储数据模型。改进官方文档中的一对 多数据模型,分适用场景讨论,补充了一对大量数据的数据模型。对于多对多 关系,补充一种适用场景广泛的双数组相互关联的模型。对于树型结构关系, 补充了 3 种数据模型,孩子数组模型,父亲孩子 id 关联模型,DBRefs 关联模型。 (2)给出改进数据模型上进行关系操作的接口。分别对前面提出的改进数 据模型实现和 SQL 相同功能的关系操作,总结抽象出在数据模型上进行关系操 作的接口。然后,将这些接口进行优化化简,得到一组接口。调用这些接口操 作 MongoDB,能够实现在这些改进数据模型上的关系操作。 (3)补充一种 MongoDB 事务处理解决方案。基于 MongoDB 单文档能够 保持事务的特性,类比关系数据库,补充一种简单又适用广泛的 MongoDB 事务 处理解决方案。论文给出解决方案流程图和解决方案实现。 (4)验证模型与性能分析。设计测试实验,验证这一组接口的功能,并且 调用这些接口操作 MongoDB 实现与 MySql 相同的功能,对比消耗时间。采用 控制变量法,从读写速度和并发两方面对比分析两者性能。 研究成果表明:论文中提出的 MongoDB 结构化存储数据模型,能够较好地 实现模型上的关系操作,而且在小数据量低并发的情况下,性能优异。 关键词:MongoDB 数据模型;结构化存储;关系操作;事务处理 I Abstract With the advent of Web2.0, relational databases face the challenges of massive, high concurrent and high scalable data, while non relational databases can solve these problems. Although MongoDB is a typical and widely used NoSQL database, its performance is not good for handling complicated relational operations. The purpose of the research on MongoDB structural data access is to make the complex relationship operations between documents easy. The MongoDB structural data access is to store the relationship between data in database according to certain data structures and perform relational operations on the data model. Although the official documentation of MonogDB has offered a variety of relational model for one-to-one, one-to-many and tree-structure data, there are a lot of issues exist, such as its one-to-many model does not consider the application scenarios for the data model, and does not put forward many-to-many data model etc.. To solve these problems, this thesis has done the following work: Improve and add

文档评论(0)

1亿VIP精品文档

相关文档