MongoDB loves developers. And we want to make software engineers everywhere successful with building applications—whether that’s a serverless web app, a mobile game, an IoT integration, or any other application you can imagine.
Using MongoDB to store your data is easy with our idiomatic drivers and libraries. We officially support 12 programming languages; and we also have a strong community who has developed additional libraries and drivers to work with nearly every programming language that exists today. We embrace the polyglot developer—and many of our customers use MongoDB with multiple programming languages within the same application.
MongoDB is the most popular NoSQL databases and is widely adopted for storing and managing both structured and unstructured data. Data administrators, analysts, and programmers can use the programming language of their choice to optimize and manage data, and create highly performant applications.
Even with many other high-level programming languages, C remains a strong choice for legacy and modern applications because of its performance and support for new features.
Learn how you can connect MongoDB and C applications using the official driver, libmongoc
MongoDB and C# are a natural fit as C# has a huge community and fast development time. Eight out of the top 10 gaming companies run MongoDB and C#, most often utilizing the Unity gaming engine.
The MongoDB C# (.NET) official driver provides asynchronous interaction with MongoDB, and our Realm Unity SDK is also very popular. C# developers may also be interested in our .Net Analyzer, which offers code completion and helpers when writing MongoDB queries.
Go is a language that offers high performance and great memory management features. It’s used in large projects for the cloud, such as Kubernetes, because of its efficient concurrency handling.
Its data-friendly syntax, used with MongoDB’s flexible schema, makes a powerful combination to build high-performance applications.
You can get started with the MongoDB Go driver by following the Golang and MongoDB tutorial from our website.
MongoDB can support users utilizing our nodeJS driver (which is actually written in typescript!), Mongoose, the Prisma.io ORM, and others.
PHP is a server-side scripting language that’s used to build dynamic web pages and websites. Even with the presence of many other feature-rich languages, PHP still holds a strong place because of its gentle learning curve and welcoming community. PHP applications can be securely connected to different databases, including MongoDB.
Combined with MongoDB, PHP applications are highly scalable, robust, and offer high performance.
In addition to the MongoDB PHP driver, many libraries and framework extensions are available to help developers get started even more quickly, including the community-created and -maintained MongoDB Laravel framework integration.
Python is one of the most popular languages for data-intensive tasks and data science because of the many libraries for statistics, machine learning, and AI-related tasks. Python is also very easy to learn, with human-readable syntax and a large community full of resources for beginners.
MongoDB is a great fit for Python developers, whether you’re building a web application, conducting data analysis, or focused on operations. This is because Python stores data in a dictionary format, which is similar to the JSON-like format in which MongoDB stores data. Python also can parse JSON data using built-in methods in a single step. This makes data retrieval and storage faster and more efficient.
Connect MongoDB to Python applications using the official driver pymongo for basic and advanced CRUD (create, read, update, delete) operations, and use pymongoarrow to export MongoDB data to pandas dataframes, numpy arrays, csv, and parquet files.
Ruby has been around since the mid-1990s, but really became popular for web developers in the early 2000s with the release of the Rails framework. The language is mostly known for its elegant syntax, which makes it easy to read in a natural way.
MongoDB has a native Ruby driver that follows that same paradigm, along with an official ORM (ODM) called Mongoid. It provides an efficient way to map Ruby objects to MongoDB entities. Find out how to build a Ruby on Rails application with MongoDB in this tutorial.
Rust provides memory safety and supports concurrent programming.
Rust is a low-level programming language with high performance, memory safety, and concurrency. Rust is most often used with MongoDB to write game engines and embedded applications.
Rust is strictly typed, whereas MongoDB has a flexible schema, and users can experience both via our serde integration.
Read our introduction to MongoDB and Rust to learn more about how to use the MongoDB Rust driver to build scalable and high performance applications.
Scala is an all-purpose language used for data processing, web development, and distributed computing. It’s used by data engineers and software developers alike. To process huge datasets, data engineers and data scientists often use Scala along with Apache Spark.
By using Scala with a NoSQL or document database like MongoDB, you can build scalable data-intensive applications with ease thanks to MongoDB’s powerful features, including aggregation pipeline and real-time analytics.
The MongoDB Scala driver provides official support for Scala applications. Using Scala and MongoDB for Spark-based projects, developers can build faster applications and perform advanced real-time analytics and machine learning.
Swift is a powerful language for both mobile and server-side development. MongoDB allows Swift developers to have the best of both worlds: Use our Realm Swift SDK for mobile or use our Swift driver with Vapor to develop cross-platform web and mobile applications. An example application can be found here on our Github.
Below is the summary of the best languages that work with NoSQL databases like MongoDB using a native driver:
|Language||Use Case||Native Driver|
|C||Gaming, OS development, embedded systems||libmongoc|
|C++||IoT devices, machine learning tools, game development||mongocxx|
|C#||Web application development, gaming apps||MongoDB C#/.NET driver|
|Go||Cloud native applications, distributed web apps||MongoDB Go driver|
|Java||Enterprise web development, AI and deep learning||Java driver Java Reactive Streams|
|Node.js||Big data analytics, real-time data apps, chatbots||MongoDB Node driver|
|PHP||Web development, image processing, CMS system||MongoDB PHP driver|
|Python||Web scraping, IoT, AI||PyMongo|
|Ruby||Ecommerce applications, social networks||MongoDB Ruby driver|
|Rust||Operating systems, distributed online services||MongoDB Rust driver|
|Scala||Data pipelines, data processing, real-time information processing||MongoDB Scala driver|
|Swift||Offline capabilities, mobile applications||MongoDB Swift driver|
MongoDB supports many languages that are widely used for various data-intensive applications, like Java, C, and C++ for web applications and gaming; Python and Scala for big data applications; Node.js, PHP, and C# for server-side scripting; and many others. See the full list of MongoDB-compatible languages.
MongoDB is not a programming language. MongoDB is a general purpose document database (sometimes referred to as a NoSQL database) that uses the MongoDB Query Language (MQL) to store and retrieve data from various applications and perform various aggregations, analytics, and visualizations to make business sense of data.
MongoDB is a NoSQL database, i.e., Not Only SQL. Whether MongoDB is better or SQL is better all depends on the business purpose, the use case, and the way in which data is retrieved—and we believe developers should have the information they need to choose the best tool for the task. MongoDB supports many programming languages and is very suitable for storing and managing today’s growing amount of unstructured and semi-structured big data.
MongoDB’s database-as-a-service, MongoDB Atlas, provides support for multiple cloud providers, like AWS and Azure, and comes with many benefits. RDBMS systems like SQL are still widely adopted and mostly used for structured data. Most BI and big data tools rely on SQL.
MongoDB is easy to learn. Whether or not you have prior experience with any database, you can easily understand the concept behind MongoDB and, most importantly, its query language.
Our MongoDB Developer Center provides tutorials, videos, and quickstarts to learn MongoDB with the programming language of your choice.