DB-EnginesInfluxDB: Focus on building software with an easy-to-use serverless, scalable time series platformEnglish
Deutsch
Knowledge Base of Relational and NoSQL Database Management Systemsprovided by solid IT

DBMS > Google Cloud Spanner vs. H2 vs. MongoDB

System Properties Comparison Google Cloud Spanner vs. H2 vs. MongoDB

Please select another system to include it in the comparison.

Editorial information provided by DB-Engines
NameGoogle Cloud Spanner  Xexclude from comparisonH2  Xexclude from comparisonMongoDB  Xexclude from comparison
DescriptionA horizontally scalable, globally consistent, relational database service. It is the externalization of the core Google database that runs the biggest aspects of Google, like Ads and Google Play.Full-featured RDBMS with a small footprint, either embedded into a Java application or used as a database server.One of the most popular document stores available both as a fully managed cloud service and for deployment on self-managed infrastructure
Primary database modelRelational DBMSRelational DBMSDocument store
Secondary database modelsSpatial DBMSSpatial DBMS
Search engine infointegrated Lucene index, currently in MongoDB Atlas only.
Time Series DBMS infoTime Series Collections introduced in Release 5.0
DB-Engines Ranking infomeasures the popularity of database management systemsranking trend
Trend Chart
Score4.40
Rank#91  Overall
#46  Relational DBMS
Score8.30
Rank#54  Overall
#32  Relational DBMS
Score455.18
Rank#5  Overall
#1  Document stores
Websitecloud.google.com/­spannerwww.h2database.comwww.mongodb.com
Technical documentationcloud.google.com/­spanner/­docswww.h2database.com/­html/­main.htmldocs.mongodb.com/­manual
DeveloperGoogleThomas MuellerMongoDB, Inc
Initial release201720052009
Current release2.1.210, January 20226.0.1, August 2022
License infoCommercial or Open SourcecommercialOpen Source infodual-licence (Mozilla public license, Eclipse public license)Open Source infoMongoDB Inc.'s Server Side Public License v1. Prior versions were published under GNU AGPL v3.0. Commercial licenses are also available.
Cloud-based only infoOnly available as a cloud serviceyesnono infoMongoDB available as DBaaS (MongoDB Atlas)
DBaaS offerings (sponsored links) infoDatabase as a Service

Providers of DBaaS offerings, please contact us to be listed.
ScaleGrid for MongoDB Database: Fully managed hosting for MongoDB Database on a wide variety of cloud providers and On-Premises. Automate your management, scaling and backups through one centralized platform.
Implementation languageJavaC++
Server operating systemshostedAll OS with a Java VMLinux
OS X
Solaris
Windows
Data schemeyesyesschema-free infoAlthough schema-free, documents of the same collection often follow the same structure. Optionally impose all or part of a schema by defining a JSON schema.
Typing infopredefined data types such as float or dateyesyesyes infostring, integer, double, decimal, boolean, date, object_id, geospatial
XML support infoSome form of processing data in XML format, e.g. support for XML data structures, and/or support for XPath, XQuery or XSLT.nono
Secondary indexesyesyesyes
SQL infoSupport of SQLyes infoQuery statements complying to ANSI 2011yesRead-only SQL queries via the MongoDB Connector for BI
APIs and other access methodsgRPC (using protocol buffers) API
JDBC infoAt present, JDBC supports read-only queries. No support for DDL or DML statements.
RESTful HTTP API
JDBC
ODBC
proprietary protocol using JSON
Supported programming languagesGo
Java
JavaScript (Node.js)
Python
JavaActionscript infounofficial driver
C
C#
C++
Clojure infounofficial driver
ColdFusion infounofficial driver
D infounofficial driver
Dart infounofficial driver
Delphi infounofficial driver
Erlang
Go
Groovy infounofficial driver
Haskell
Java
JavaScript
Lisp infounofficial driver
Lua infounofficial driver
MatLab infounofficial driver
Perl
PHP
PowerShell infounofficial driver
Prolog infounofficial driver
Python
R infounofficial driver
Ruby
Rust
Scala
Smalltalk infounofficial driver
Swift
Server-side scripts infoStored proceduresnoJava Stored Procedures and User-Defined FunctionsJavaScript
Triggersnoyesyes infoin MongoDB Atlas only
Partitioning methods infoMethods for storing different data on different nodesShardingnoneSharding infoPartitioned by hashed, ranged, or zoned sharding keys. Live resharding allows users to change their shard keys as an online operation with zero downtime.
Replication methods infoMethods for redundantly storing data on multiple nodesMulti-source replication with 3 replicas for regional instances.With clustering: 2 database servers on different computers operate on identical copies of a databaseMulti-Source deployments with MongoDB Atlas Global Clusters
Source-replica replication
MapReduce infoOffers an API for user-defined Map/Reduce methodsyes infousing Google Cloud Dataflownoyes
Consistency concepts infoMethods to ensure consistency in a distributed systemImmediate ConsistencyImmediate ConsistencyEventual Consistency
Immediate Consistency infocan be individually decided for each write operation
Foreign keys infoReferential integrityyes infoby using interleaved tables, this features focuses more on performance improvements than on referential integrityyesno infotypically not used, however similar functionality with DBRef possible
Transaction concepts infoSupport to ensure data integrity after non-atomic manipulations of dataACID infoStrict serializable isolationACIDMulti-document ACID Transactions with snapshot isolation
Concurrency infoSupport for concurrent manipulation of datayesyes, multi-version concurrency control (MVCC)yes
Durability infoSupport for making data persistentyesyesyes infooptional, enabled by default
In-memory capabilities infoIs there an option to define some or all structures to be held in-memory only.noyesyes infoIn-memory storage engine introduced with MongoDB version 3.2
User concepts infoAccess controlAccess rights for users, groups and roles based on Google Cloud Identity and Access Management (IAM)fine grained access rights according to SQL-standardAccess rights for users and roles

More information provided by the system vendor

We invite representatives of system vendors to contact us for updating and extending the system information,
and for displaying vendor-provided information such as key customers, competitive advantages and market metrics.

Related products and services
3rd partiesStudio 3T: The world's favorite IDE for working with MongoDB
» more

Percona: Database problems? Not on your watch.
Databases run better with Percona.
» more

CData: Connect to Big Data & NoSQL through standard Drivers.
» more

Navicat for MongoDB gives you a highly effective GUI interface for MongoDB database management, administration and development.
» more

We invite representatives of vendors of related products to contact us for presenting information about their offerings here.

More resources
Google Cloud SpannerH2MongoDB
DB-Engines blog posts

Snowflake is the DBMS of the Year 2021
3 January 2022, Paul Andlinger, Matthias Gelbmann

PostgreSQL is the DBMS of the Year 2020
4 January 2021, Paul Andlinger, Matthias Gelbmann

PostgreSQL is the DBMS of the Year 2018
2 January 2019, Paul Andlinger, Matthias Gelbmann

show all

Recent citations in the news

Google Cloud and Deloitte Boost Grocery Associate Productivity and ...
20 January 2023, PR Newswire

Kroger upgrades to cloud-based IT architecture for retail operations
24 January 2023, Winsight Grocery Business

Kroger boosts associate productivity with Google Cloud, Deloitte ...
20 January 2023, Drug Store News

Database Futures with a Cockroach Labs Co-Founder
27 January 2023, Datanami

Google Cloud Spanner Introduces Free Trial Instances and Fine ...
24 September 2022, InfoQ.com

provided by Google News

MongoDB, Inc. (NASDAQ:MDB) Shares Acquired by Bank Julius ...
26 January 2023, MarketBeat

Why Datadog, MongoDB, and CrowdStrike Were Sinking Today
25 January 2023, The Motley Fool

Cloud-Computing Stocks Rally as Microsoft Results Bring Relief ...
25 January 2023, Bloomberg

Premarket Mover: Mongodb Inc (MDB) Down 2.44%
25 January 2023, InvestorsObserver

Satori Expands Support to NoSQL Databases, Streamlines Secure ...
19 January 2023, Datanami

provided by Google News

Job opportunities

Cloud Relational Database Engineer
Ford Motor Company, Dearborn, MI

Contractor - DevOps Engineer
ChaiOne, Remote

Senior Product Manager, Core Database
YugabyteDB, Remote

Architect - Cloud Infrastructure and Databases
Ford Motor Company, Dearborn, MI

Database Engineer
Miracle Software Systems, Michigan

General Apply
Bevy, San Francisco, CA

MongoDB Architect/SrDev
Tech Mahindra / Microsoft, Remote

MongoDB Consultant
Pristine IT, Remote

Database Performance Consultant - MongoDB
Percona, Remote

MongoDB Engineer
Alltech International, Remote

jobs by Indeed



Share this page

Featured Products

Redis logo

The world’s most loved real‑time data platform.
Try free

Neo4j logo

See for yourself how a graph database can make your life easier.
Use Neo4j online for free.

MariaDB logo

SkySQL, the ultimate
MariaDB cloud, is here.

Get started with SkySQL today!

The definitive guide for Cassandra

Imagine What You Could Do if Scalability Wasn‘t a Problem!
Download the Cassandra e-book for free!

AllegroGraph logo

Graph Database Leader for AI Knowledge Graph Applications - The Most Secure Graph Database Available.
Free Download

Present your product here