views:

411

answers:

6

We're living in a golden age of databases, with numerous high quality commercial and free databases. This is great, but the downside is there's not a simple obvious choice for someone who needs a database for his next project.

  • What are the constraints/criteria you use for selecting a database?
  • How well do the various databases you've used meet those constraints/criteria?
  • What special features do the databases have?
  • Which databases do you feel comfortable recommending to others?

etc...

+7  A: 

I would think first on what the system requirements are for data access, data security, scalability, performance, disconnected scenarios, data transformation, data sizing.

On the other side, consider also the experience and background of developers, operators, platform administrators.

You should also think on what constraints you have regarding programming languages, operating systems, memory footprint, network bandwidth, hardware.

Last, but not least, you have to think about business issues like budget for licences, support, operation.

After all those considerations you should end up with just a couple of options and the selection should be easier.

In other words, select the technology that suits the best the constraints and needs of your organization and project.

I certainly think that you are right on saying that it is not an obvious choice given the wide number of alternatives, but this is the only way I think you can narrow them to the ones that are really feasible for your project.

Sergio Acosta
+2  A: 

Surely the most compelling factor is the expertise of you or your team...or the pool of resource you are likely to hire in the future. I would tend to go with the grain most of the time, using MySQL in a LAMP team and SQL Server in a MS team, since either of these products is capable of doing everything necessary even in a high-load environment.

The benefits of any other database are going to be marginal compared to the pain of learning how to use it well. The only exception to this, in my opinion, would be in a high-demand environment where:

a. the obvious choice has been tried and is failing

b. the benefits of scaling multiply the marginal benefit to such a degree that it will be worth the cost of using something unexpected.

I would assume the need to hire at least two and preferably three excellent DBAs with long term familiarity with the new database.

And first I would try to hire them for the technology that was failing, because it is more likely to be the way it's used than the technology itself that is causing the problem.

Flubba
+3  A: 

My selection criteria (mainly programming centric):

  • Maintenance: How are updates/hotfixes installed?
  • Transaction control: How it is implemented
  • Are Stored Procedures supported?
  • Can you use exception handling in Stored Procedures?
  • Costs
  • As a benefit: Can you use recursion on Stored Procedures? (E.g. in SQL Server 2000 the recursion stops after 32 passes IIRC)
John Smithers
+3  A: 

For most people in a corporate environment the choice comes down to "the one we have".

Since you seem to be fortunate enough to have a choice, I'll take a quick run through the questions and maybe pose a few more at the end.

The biggest criterion may be cost. Do you want/are you prepared to pay for your DBMS platform? If not, then Oracle, MS SQL Server, Sybase and others are probably out, although if you're not building a commercial app then there may be some wiggle room. Also, platform - can you run the software on your hardware?

Other dimensions for consideration might include expected number of concurrent connections, transactional vs mostly reads, size, availability and I guess lots of others.

"Special features" are, in the main, to be avoided - in my cynical world-view they're intended to lock you into a platform. So something like Oracle's PL/SQL is a feature that, while powerful (and likely to mean the need for extra CPU power at more licensing cost) is not portable. If you expect extremely high volumes then partitioning may be useful, I suppose.

I have worked with Oracle, MS SQL Server, MySQL, PostreSQL, SQLite and Sybase that I can think of. I'd happily recommend all but Sybase, about which I have some concerns these days (I could easily be wrong, but personally I think the money could be better spent elsewhere) but not all for the same applications.

Ideally, I like to have the warm feeling that it doesn't really matter what DB platform I'm using because I can port easily. With a good abstraction layer between data and business logic, I should be able to develop locally against, say, the excellent SQLite and implement painlessly on, for example, Postgres. With something like ActiveRecord from Rails coupled with a little awareness of things like differences in reserved words, this is almost completely cost-free.

Mike Woodhouse
It's maybe a little _too_ cynical to suggest that the purpose of vendor specific features is to lock you in to their platform :)
David Aldridge
+2  A: 

The existing answers are great. It's worth bearing in mind that Oracle now has an XE version of it's 10g database which is available for free and comes with Application Express, a great web based development environment.

It is limited, 4GB HD, 1 GB Ram and uses only one CPU. This is enough to run smaller system though and can be upgraded easily at a later date if necessary. Oracle can be one of the toughest to learn but is also one of the best to have on your CV :-)

I think SQLServer from Microsoft also has a 'starter' type database. Don't discount the commercial products - if you are going to bet your company on a database technology I would rather be using a product from Oracle or Microsoft personally. Thats not to say there is anything wrong with Open Source.

Spend a while evaluating them :-)

stevechol
A: 
  • Linux, Web Hosted - MySQL (PostreSQL maybe)
  • Mainstream SME - MS SQL
  • Big Iron (banking etc) - Oracle

Thinking about anything other than those three is masturbation - any of the other databases becomes a discussion about niche products to solve particular problems that you probably haven't encountered yet. If you choose anything other than the three above you will -

  1. Struggle to find people to work on the project or keep the database going
  2. Struggle to motivate your decision without an academic discussion
  3. Someone will curse you, your ancestors and your lineage a few years down the line - and replace your choice anyway.

Niche databases are not where architectural strides are made - it is technologies like middleware, messaging, cloud services etc where you can afford to (and should) go out on a limb to find good products.

Simon Munro