DEV Community

Cover image for Best Database for C++ Development
Rishabh Bisht
Rishabh Bisht

Posted on

Best Database for C++ Development

C++, TIOBE’s most popular language for 2022, is a powerful & high-performance programming language that is widely used for a variety of different purposes. One area where C++ is particularly useful is in the development of database-driven applications.

Are you wondering what is the best database for C++ application you are building? In this article, we will take a look at the databases used by C++ developers. The source of the data is Stack Overflow survey 2022 raw data, filtered for C++ developers. There were over 70,000 developers who responded to this survey, and 16,024 of those had experience working with C++.

So, which database do C++ developers use?

Best Database for C++

MySQL (44.2%) and PostgreSQL (34.2%)
MySQL and PostgreSQL are open-source relational database management systems, which organize the data into tables with rows and columns. C++ developers can interact with these databases using libraries such as MySQL Connector/C++ and libpqxx (PostgreSQL C++ library).

SQLite (37.4%)
SQLite is a small, lightweight, and self-contained SQL database engine that can be embedded in applications and used to store and retrieve data. C++ developers can use SQLite C++ library such as sqlite3pp, SQLiteCpp to work with SQLite.

MongoDB (26.9%)
MongoDB is the most popular NoSQL database used by C++ developers based on the survey results.It is a document based database, designed to handle large amounts of unstructured data and can handle a very high volume of read and write operations with a wide variety of use cases. C++ developers can interact with MongoDB by using the MongoDB C++ Driver.

Which database do C++ developers want to use?

Database C++ developers want to use

Stackoverflow survey also reports data on the database that C++ developers want to use. Here we can see PostgreSQL and MongoDB climbing up the ladder, but overall the result is similar.

  • PostgreSQL (30.0 %)
  • SQLite (25.1%)
  • MongoDB (23.96%)
  • MySQL (23.66%)

Top comments (0)