摘要
大量根据CNONIX标准编写的XML格式的数据如何在数据库中存储是目前亟需研究并解决的问题.本文首先介绍非关系型数据库的特点,之后分析CNONIX数据的格式特点,将XML与BSON格式进行比对,提出了基于MongoDB的CNONIX数据存储方案,将XML格式转换为BSON数据后存入MongoDB数据库中.运用Apache JMeter对此方案进行性能测试,并与传统关系型数据库进行对比.结果表明,CNONIX数据在MongoDB数据库中存储简便,且效率较关系型数据库有明显提高,能够解决其在关系型数据库中不易存储的问题.
How to store a large number of data based on the CNONIX standard and formatted in XML in a database is a pressing problem to be solved currently.This paper first describes the characteristics of a non-relational database,and then it analyzes the characteristics of CNONIX data format.After a comparison of the format between XML and BSON,we present a storage solution of CNONIX data based on MongoDB.The solution is that the XML format data is converted into BSON format,and then the data are to be stored in the MongoDB database.Apache JMeter is used to test the performance of this solution and a comparison was also made with the traditional relational database.The results show that it's simple to store CNONIX data in MongoDB database,and the efficiency has been improved significantly compared with relational database.This solution can solve the problem of the complication in the storage of CNONIX data in the relational database.
出处
《北方工业大学学报》
2016年第3期40-48,共9页
Journal of North China University of Technology