Computer Engineering and Applications ›› 2017, Vol. 53 ›› Issue (7): 104-108.DOI: 10.3778/j.issn.1002-8331.1508-0203

Previous Articles     Next Articles

Performance comparison of PostgreSQL and MongoDB dealing with unstructured data

ZONG Ping1, LI Lei2   

  1. 1.College of Overseas Education, Nanjing University of Posts and Telecommunications, Nanjing 210023, China
    2.College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 210023, China
  • Online:2017-04-01 Published:2017-04-01

PostgreSQL与MongoDB处理非结构化数据性能比较

宗  平1,李  雷2   

  1. 1.南京邮电大学 海外教育学院,南京 210023
    2.南京邮电大学 计算机学院,南京 210023

Abstract: Traditional relational databases can hardly store or handle massive unstructured data generated by Internet technology development efficiently. Varieties of NoSQL databases are capable to deal with unstructured data, but are poor in dealing with relational calculation under certain circumstances. Some new relational databases provide efficient ways to store both unstructured and structured data in multiple environments. In order to compare the data storage and processing capabilities of relational database and document-oriented NoSQL database quantitatively, this paper compares the unstructured data storage methods between hstore in PostgreSQL and embedded document in MongoDB. Performance and applicability analysis are also made by comparing performance of bulk loading, disk footprint, query on primary key and geometry coordinates.

Key words: PostgreSQL, hstore, MongoDB, embedded document

摘要: 互联网技术的发展产生的海量非结构化数据在传统关系型数据库中难以被高速有效地进行存储和处理,各类NoSQL数据库可以有效存储处理非结构化数据,但是对关系运算功能的弱化难以满足应用场景的需求。具备非结构化数据处理能力的新型关系型数据库提供了适用多种应用场景的高效存储方式。为了能够定量地比较关系型数据库和面向文档的NoSQL数据库的数据存储与处理能力,比较了PostgreSQL的hstore数据类型和MongoDB的内嵌文档对非结构化数据的储存方式,并通过非结构化数据的批量加载、磁盘占用、主键查询、非主键查询、地理空间坐标查询等方面的对比来以分析性能特征与适用场景。

关键词: PostgreSQL数据库, hstore数据类型, MongoDB数据库, 内嵌文档