PostgreSQL
Self-hosted open sourceOpen sourceOpsMediumA powerful open-source relational database, regarded as the "all-rounder".
Best forThe first choice for most new projects, especially those with complex business logic that need many kinds of data capabilities.
Avoid whenThe team only knows MySQL and the project is very simple, or there are existing systems strongly dependent on another database.
ProsRich features: full-text search, JSON columns, extensions and more
Very good support for complex queries and data integrity
Fully open source, with no licensing fees
ConsDefaults are conservative, so production needs tuning
Some older tutorials and ops experience in China center on MySQL
Needs periodic maintenance such as VACUUM, and long neglect can hurt performance
Official docs ↗
MySQL
Self-hosted open sourceOpen sourceOpsMediumThe most widely used open-source relational database in China, with plenty of documentation and talent.
Best forRegular business systems, e-commerce, and projects where the team already has MySQL experience.
Avoid whenYou need complex analytical queries or lots of advanced features such as JSON/full-text search.
ProsIt is very widely used, with lots of material, experience, and hosted versions
Simple workloads read and write well, and the barrier to starting is low
The major clouds already offer a ready, mature managed service
ConsComplex queries are less rich than in PostgreSQL
Engines and SQL modes differ, and a wrong setting can truncate data
Some editions belong to Oracle, so compatibility has to be checked
Official docs ↗
SQL Server
Commercial self-hostedSubscriptionOpsMediumMicrosoft's commercial database, most tightly integrated with the .NET / C# ecosystem.
Best forC# projects on an existing Microsoft stack, internal enterprise systems, or with licenses already purchased.
Avoid whenIndividual or startup projects with limited budgets, or stacks centered on Python.
ProsIt works smoothly with C#, EF Core, and the toolchain
The management tools are graphical, so day-to-day work is convenient
For enterprise use, the docs, the support, and the people are all there
ConsProduction use needs a purchased license, which costs more than open source
It can run on Linux, but the Windows ecosystem is the more familiar one
Outside the Microsoft stack, material and community are thinner
Official docs ↗
SQLite
Built into the frameworkOpen sourceOpsLowOne file is one database: no database service to install, and the program reads and writes the file directly.
Best forPersonal blogs, prototypes, local tools, small single-machine apps.
Avoid whenMany users write frequently at the same time, or multiple servers need to access the same database.
ProsZero deployment: one file is the whole database
Backup and moving it are just copying that one file
For a small project that reads much more than it writes, performance is enough
ConsOnly one writer can run at a time, so concurrent writes have to queue
Several servers cannot share the same database file
It lacks features such as stored procedures, so moving to another database takes extra work
Official docs ↗
MongoDB
Self-hosted open sourceFree tier + paidOpsMediumA document database: data is stored as JSON-like documents, with no need to design a fixed table structure beforehand.
Best forData with varying structure, such as content management, logs and IoT data.
Avoid whenBusinesses like orders and payments that need strong consistency and complex relations; prefer a relational database.
ProsWhen fields change often, adjusting the shape is convenient
Nested documents are intuitive to store and read, with fewer join tables
Sharding is already mature, which makes scaling out easier
ConsJoins and transactions across collections are less natural than in a relational database
A structure that is too loose invites dirty data, so you have to constrain it yourself
The commercial license differs from pure open source, so read it when you choose
Official docs ↗