5 min

Introduction of new API allows developers to work with document-oriented JSON databases from MongoDB in the Oracle Cloud, and vice versa.

One of the basic principles of Oracle’s database strategy is that it offers everything within a single database environment. In doing so, it is taking a radically different route from, say, AWS. That, on the contrary, is betting on different databases, each with a specific purpose. The latter route makes it easy to add other types of databases to an IT environment. On the other hand, it is then more difficult to integrate the different types than if you do everything in a single environment.

What the best approach is undoubtedly depends on many different factors. Oracle claims that offering all functionality centrally in a single environment is the best option, that’s for sure. This also includes making non-relational databases accessible within the environment. Document-oriented JSON databases are a good example of this. These are fundamentally different from relational databases. Today Oracle announces an API that allows the integration of JSON MongoDB databases and its SQL Autonomous Database.

MongoDB on Oracle Cloud (and vice versa)

At first glance, the announcement of the Oracle Database API for MongoDB may seem like something small. After all, this is only an API. However, the impact of this API is quite large. It allows developers to integrate MongoDB JSON databases with the Oracle Cloud. This is important, because no DBA wants to rebuild an entire database in a new environment. There is also virtually no ETL involved. Seen in this light, this is quite a big announcement. It also gives Oracle itself a better position in the JSON world. A few years ago it added support for JSON to its Autonomous Database, this announcement is the next step.

Specifically, the announcement means that applications using MongoDB will be able to seamlessly connect to, for example, an OLTP database in the Oracle Cloud. Conversely, the API also makes it possible to open up relational resources (Oracle SQL Databases) to MongoDB. The new API is compatible with MongoDB API 4.2. The only thing you need to do, according to Oracle (and which was also shown during a demo we attended), to seamlessly go from one environment to another is to modify the connect string.

No switch of tooling necessary

Exposing one type of database for the other environment and vice versa is convenient in itself. However, if this means switching tooling, developers quickly become a lot less enthusiastic. With this new offering from Oracle, that is not necessary. That is, you can just keep working from MongoDB tools (Compass, Atlas) to set up and use your databases for your application. In doing so, it doesn’t matter whether you are addressing an Oracle database or a MongoDB database.

Again, it can also be done the other way around, as was also shown during the live demo we attended. That allows developers using Oracle’s relational database to deploy JSON within MongoDB, from within the Oracle environment. Interestingly, you then also have SQL support. You can run SQL queries on JSON data, then get the result back in relational form.

Oracle Autonomous Database ‘secret sauce’ over MongoDB resources

Technically and theoretically, the announcement of the Oracle Database API for MongoDB sounds interesting. However, according to Oracle, there are plenty of practical reasons why you would want this as a developer. First, the Oracle database adds the full range of capabilities of Oracle SQL to JSON data. That is, you have things like Machine Learning, Spatial Analysis for GeoJSON, PL/SQL and Virtual Private Database at your disposal. This allows developers to do much more with JSON data than they could do before.

In addition to specific features, Oracle is also adding other features and capabilities to applications that use MongoDB JSON databases. We talked above about the fact that there is virtually no ETL to be done. Basically, all you have to do is expose a collection. In addition, there are no limits on duration and format of transactions and the maximum size of a document is a lot larger. Where MongoDB Atlas is limited to 16 MB, Oracle goes up to 32 MB. The documents can also be a lot deeper in de database: 1024 compared to 100 levels. In addition, it is important to note that Oracle Autonomous JSON scales up automatically and is cheaper than MongoDB Atlas.


Ultimately, however, it’s not just about the specs and features of course. The timing of an announcement must also be right. According to Oracle, which had already been running the API in preview for several months with some customers, that timing is right. On the one hand, cloud databases require more and more automation. That’s obviously what the Autonomous Database was conceived for. It not only offers the elasticity we talked about above. It also tunes itself, as it were, and adds all the security features to your MongoDB JSON databases that are also in the Autonomous Database.

Oracle is also seeing more and more migrations of MongoDB databases, an Oracle spokesperson indicated during the briefing we attended. The reason for this is that MongoDB is inadequate for enterprise environments. In addition, there are virtually no organizations that only have document-oriented workloads anyway. No one is using JSON alone. So it makes sense to have something to bridge the gap between the different databases.

Perhaps the most striking thing about the whole announcement is that what Oracle has to offer for MongoDB JSON databases in its own Autonomous Database also costs less. At least, that’s what Oracle’s own calculations seem to suggest. For 16 vCPUs and 1 TB of storage you pay $2.94 per hour at Oracle, an Nvidia M60 instance on AWS with the same number of vCPUs and 320 GB of storage costs $3.95 per hour.

Everything merges in the end

Finally, you can also put today’s announcement in a somewhat broader perspective. Many technologies tend to slowly but surely merge with each other somewhere along the way. We’ve seen that with XML, for example. That was also clearly separate from other database types at first, but slowly but surely integrated into those other types as well. That’s basically what you see happening with JSON now with this announcement.

In summary, the integration of MongoDB and Oracle sources that is now possible using the new API should give developers a modern environment that is suitable for enterprise environments and takes advantage of what the Oracle Autonomous Database platform has to offer. All this without forcing anyone to start using other tooling. It’s going to be interesting to see whether this gives Oracle a boost in the JSON department.