2

I need help with a chose. I want to chose a database_management_system for my .NET Web Site. My current variants is :

- MariaDB
- PostgreSQL
- Firebird

I used MS SQL and have no experience with those ones and can't compare them.

What I need from them is : Stability, speed, and free and good ORM for .NET , help me to chose one of them please.

For a moment I prefer Postgres but have no idea why.

Added : And I think I need a true killer-feature to change my opinion.

cnd
  • 32,616
  • 62
  • 183
  • 313

2 Answers2

5

I prefer PostgreSQL over MySQL any time. PostgreSQL has more features when it comes to SQL statements (windowing functions, recursive common table expressions) better support for constraints and indexing (e.g. partial and function based indexes).

And I'm still unsure about when the GPL license forces me to buy a commercial license - especially for commercial applications. That is another I reason I avoid MySQL - the license situation is simply too unclear and vague for me.

PostgreSQL is more complicated to setup in an environment where you need a true cluster with load balancing read and write statements.

High availability (i.e. a spare server that takes over when the main server dies) is - especially with 9.x - just as easy as with MySQL.

In terms of speed there is probably not much difference between them. Any of them can be fast and any of them can be slow. It depends on how you use it and the characteristics of your workload (PostgreSQL seems to be faster with high concurrent reads and writes - but this might have changed with MySQL 5.5 and the improved InnoDB engine).

Firebird is very powerful in terms of SQL features as well (AFAIK it was the first open source DBMS to support recursive common table expression).

My biggest concern with Firebird is the cluttered documentation. Due to licensing issues there is no single large manual, but it is a collection of the original Interbase manuals plus the release notes for each version. So if you need to check a certain syntax you start with the Interbase manual, then check the release notes for FB 1.5, then FB 2.0, then FB 2.1. A bit clumsy, but the team is working on that and the documentation is improving (still can't match the PostgreSQL or MySQL manual).

I'm not a big fan of ORMs anyway, and I have never used PostgreSQL with .Net as I only use Java. So I cannot comment on that

  • Good points +1. I generally agree with you - though I don't really have a preference between the two. For me the advanced SQL features are less of an issue when you're using an ORM - as you're relying on the ORMs connector for each particular DB to take advantage of the extra features, which often they wont. – UpTheCreek Apr 06 '11 at 07:12
  • 1
    @UpTheCreek: The problem with ORMs is that they never exploit those advanced features and you may wind up with unnecessary complex statement that could be simplified (and potentially made faster) by using a DBMS specific feature. I yet have to see an ORM that will use a recursive CTE to retrieve hierarchical data, or combines several windowing function to obtain different group aggregates in a single query. –  Apr 06 '11 at 07:20
  • Yes I completely agree (some of the generated SQL is really nasty), but if ORMs are to support multiple databases, one can hardly expect them to completely adapt their query strategies for the particulars of each and every DB. We can usually specify manual SQL for the ORM on in special cases though (to take advantage of DB specific features for optimisation) – UpTheCreek Apr 06 '11 at 07:24
  • FYI, the situation regarding Firebird documentation has been improved in recent years. – Mark Rotteveel Aug 14 '22 at 10:36
2

NHibernate is a popular ORM which I recommend, although it has a fairly steep learning curve at first. It supports a number of DBMSs, including PostgreSQL and Firebird from your list, and of course MySQL - any reason this is not on your list? - it works very well with .Net.

If stability and speed are your only requirements then you will be fine with either MySQL (Community Edition) or PostgreSQL - the debate really begins when you have to consider high-availability or high-scalability scenarios, but this won't be an issue if it's a small app.

I have no experience with Firebird (nee InterBase) or MariaDB, so can't comment.

UpTheCreek
  • 31,444
  • 34
  • 152
  • 221
  • Oracle MySQL is not free. and after all I really dislike NHibernate. It smells like Java, but maybe it's just personal mean. – cnd Apr 06 '11 at 05:51
  • MySQL is just as free as any of the others you mention. You only have to pay if you want the enterprise version with some added features (that you very probably don't need). – UpTheCreek Apr 06 '11 at 06:11
  • Re NHibernate - Smells like java? Well it's a port of the Java version, so some terminology is not quite '.net like' but it doesn't force you to do anything in a Java way. What don't you like about it? – UpTheCreek Apr 06 '11 at 06:13
  • It sounds alike MySQL Express ... I feel myself a bit afraid of using it. But maybe it's really OK. – cnd Apr 06 '11 at 06:32
  • It's a fully featured version, not a throttled app like MSSQL Express. You have to abide by the GPL License, but this is not usually a problem for web apps (commercial or not) where you are not distributing anything. MySQL is dual licensed - If you cannot abide by the GPL for some reason then you have to choose the commercial license, and pay for either MySQL Standard or Enterprise. – UpTheCreek Apr 06 '11 at 06:36
  • but ..... Why not Postgre ? I am still thinking that Postgre still being a better chose then mysql. – cnd Apr 06 '11 at 06:51
  • I didn't say anything about not using PostgreSQL, I'd recommend either of them. – UpTheCreek Apr 06 '11 at 07:00