DEV Community

Cover image for Best Database to use with C#
rachelle palmer
rachelle palmer

Posted on

4

Best Database to use with C#

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#?

  1. 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.
  2. 42.93% of C# developers use mySQL extensively, which is not that surprising
  3. 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:

  1. MongoDB (25.34%)
  2. Redis (20.53%)
  3. 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).

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (1)

Collapse
 
xomega profile image
Xomega

Thanks for the post, pretty interesting stats.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay