One of the biggest questions for any developer is choosing what database to use. And if you google this term, you get mostly a lot of of outdated results -- posts from 2016 on stackoverflow, links to random blogs that haven't been updated in a decade, etc. And even though we might have a resource like db-engines to tell us the most popular databases, it doesn't tell me which databases C# developers actually use.
I decided to take the StackOverflow survey raw results, filter them for C# developers only, and then do some calculations on which databases are used extensively by C# developers. Voila!
Out of the 83k SO survey responses of 2021, 22,984 were developers who know C#. This is a fairly large sample, so let's proceed.
What databases are used with C#?
- An astounding 55.49% of C# developers use Microsoft SQL Server. This is a gigantic number considering the number of potential choices. Microsoft SQL server is far more popular with C# developers than it is with anyone else - just 22% of all StackOverflow developers use it overall.
- 42.93% of C# developers use mySQL extensively, which is not that surprising
- 32% use sqlite.
What database do C# developers want to use?
Here's where the data gets really interesting. When you compare the number of developers using a database vs what database they say they want to use, that's where we see the difference between preference/desire ("want") vs what our jobs insist upon. This is actually true for a lot of databases, where we see the number of developers are using something is more than the number of developers who say they want to. For example:
- Even though 55% of C# developers use Microsoft SQL server, just 35% say they want to use it. 35% is still a very large number, but that's a fairly significant loss.
- 29% of developers use PostgreSQL, and 28% want to use it (imo, a trivial difference)
We can also see there are some databases where the usage lags than the number of developers who want to use it:
- MongoDB (25.34%)
- Redis (20.53%)
- Elastic (14.08%)
Pretty surprising results.
What databases are not used with C#?
DynamoDB, Couchbase, Cassandra, DB2 all fared very poorly with C# developers. Cassandra in particular had just 501 users, a market share of 2%. Couchbase was even worse, with 337 (1.47% of C# developers).
Top comments (1)
Thanks for the post, pretty interesting stats.