Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm creating my first website from hand-coded scratch (just used WordPress and Drupal before) and I'm at the point where I'm setting up my database for the site. However my host has given me 4 options to choose from in the database department.

  • MS SQL Server 2005
  • MySQL
  • PostgreSQL
  • MySQL 5

Which should I go for? From what I understand PostgreSQL is meant for smaller databases with high access times. Though to be honost I'm not quite sure.

share|improve this question
2  
What language? or is that selectable too? –  Jeremy Jun 25 '09 at 17:18

15 Answers 15

up vote 5 down vote accepted

No, PostgreSQL is not designed for smaller databases, quite the contrary. But for a Website it won't make a difference. You'd probably get the most help with MySQL, because it's the most popular. It is designed for small databases though, but small in this context means quite big. :)

You'd probably get the best performance with PostgreSQL, but you aren't likely to notice that.

share|improve this answer
1  
Im not sure about the comment that MySQL is the most popular and able to get more help for it. There are plenty of free resources for all database servers, incluiding MSSQL. –  Lima Jul 15 '09 at 8:03

In this case, the answer will depend largely on what you are using to build your website.

That said, MySQL 4 is pretty much a non-starter since MySQL 5 is available and superior in pretty much every way. Most hosts keep MySQL 4 around for people who have PHP 3/4 applications that can't easily be migrated to MySQL5.

PostgresSQL is a great database, but has less of a community than MySQL, so you'll find it more difficult to get help with it. It's more of a "database expert's" database.

So, if we narrow it down to MySQL 5 and MS SQL Server, your choice largely depends on the application framework you'll be using:

  1. If you are using .NET, go with MS SQL Server - hands down. The .NET tools (Visual Studio, LINQ, etc.) are designed to integrate seamlessly with MS SQL Server, so MS SQL Server is the easiest path there.

  2. If you are using PHP, go with MySQL. Similar to .NET's integration with MS SQL Server, PHP is very well integrated with MySQL (and PostgreSQL to a lesser extent).

  3. If you are using Java, I'd lean toward MySQL, but either would work fine.

Other languages and it's pretty much a toss up as far as I'm concerned.

share|improve this answer

Usually questions as vague as this get responses that amount to "use this, because I use this" nonsense. Each database has it's own pluses and minuses and without knowing the details of the site it's impossible to give an informed opinion.

share|improve this answer

Which database are you most familiar with, choose that one.

share|improve this answer

This all depends on the:

  • skillset you already have
  • time investment you can make
  • budget constraints
  • web framework you choose
share|improve this answer

I'd go for MySQL 5. Any of the databases you mentioned will work fine for a small site, with low to moderate traffic, but if you want to switch hosts at some point MySQL 5 will be the most commonly available database.

share|improve this answer
    
MS SQL is pretty much all pervasive on shared hosting platforms too. –  Kev Jun 25 '09 at 17:20

PostgreSQL people apparently have reasons why it's vastly, infinitely better than MySQL. The way they're so snotty about it makes me not want to find out what they are, though.

share|improve this answer
1  
I don't know about "vastly" or "infinitely", but I do know that Postgres has never been able to store the date "Februrary 30" in a date column. –  Evan Anderson Jun 25 '09 at 17:32
    
Neither can MS SQL Server. –  GilaMonster Jun 25 '09 at 20:01

I'll say it doesn't really matter which one you choose. I think MS SQL Server is easiest to use and understand because of the tools, but the MySQL/PostgreSQL ones get better all the time. It might even be as good now.

Pick the one that most closely matches your experience and skills. Or the skills of friends you'll call if you have issues.

share|improve this answer

It doesn't matter what you intend to build or in what language you intend on building it in. All the database servers are scalable, especially if you are talking about a hosted or shared hosting service. I would use: Whatever fits into your budget the best; Whatever you feel most comftorable with; Whatever you think you can learn/manage the best.

While there are differences in the ways to program the queries, they are generally similar and can all do the same thing (at the level you are talking about).

I have used MS SQL Server, MySQL, and PostgreSQL. At the moment I am using MS SQL Server 2005 alot and would personally lean towards that one, for no particular reason then it is what my employer uses.

So in the end of the day, evaluate what works best for you and go with that one.

share|improve this answer

Leaving the old MySQL 4 out of the equation, any of these databases will do a fine job serving as the backend for a small website. Given the choice, however, I would go for PostgreSQL.

Compared to MS SQL Server, it's an open source database which – all things equal – I believe actually improves your odds of getting through to someone familiar with the inner workings of the system. Compared to MySQL 5, it's a more mature product, especially in the area of transaction support. (As an example: in MySQL, DDL statements such as ALTER TABLE cannot be guarded by transactions).

PostgreSQL has a reputation for being a hackers database, but it's solely based on its extensibility. The database user is given a lot of power, including the ability to define custom types and perform advanced rewrites of queries. None of this will get in your way as a inexperienced user. But it's there in case you need it.

If you do decide to go for MySQL 5, be sure to stay clear of the default MyISAM table as it offers no transaction or foreign key support. InnoDB is what you'll need.

share|improve this answer

If this is your first time working with a database I would suggest MS SQL Server because there are a lot of developers with experience with this and you will have an easier time (IMO) finding answers and getting help. Especially if you plan on using places like Stack Overflow.

share|improve this answer
1  
Yeah, and why use free software when you can pay shitloads of money for something with almost the same feature. –  niXar Jun 26 '09 at 7:57

Depends a lot on your requirements and budget....

I'd rather go with MS SQL Server, but if you like the open source arena....... go with PostgreSQL.

share|improve this answer
1  
What's better about MSSQL than Postgres, price/freedom notwithstanding? –  niXar Jun 26 '09 at 7:57
    
For a web application, nothing in particular. However, it does come with a fairly good reporting suite and an OLAP server out of the box. –  ConcernedOfTunbridgeWells Jul 15 '09 at 8:41

For a first full feature website I would run MySql5.

My decision is based on support availability, ease of use, and functionality. MySql has an amazing user community, and If you eventually need to hire someone to maintain it they are available. It is difficult to find a good, MS SQL guy who also does web (not Swearpoint). MySql is very simple to setup and administrate, phpMysqlAdmin is the tool choice for many developers. Postgres does have many nice reporting options, but configuration of those options takes time and can be highly frustrating. MS SQL setup is simple, but tying it to your web infrastructure becomes complicated. There are several different versions of the JDBC driver for MS SQL, there are issues with each, version 4 requires JRE 5 or better, but the or better doesn't work correctly. In functionality Postgres wins hands down, but configuring additional options becomes cumbersome.

share|improve this answer

MySQL 5 > MySQL > MS SQL Server 2005 > PostgreSQL

MySQL 5 For Cost, Features, Performance, Easy of Use. No point in running MySQL when you can run MySQL 5

MS SQL Server 2005 is the easiest to setup and admin, lots of good features and good performance.

share|improve this answer
2  
MySQL better than Postgres? You've gotta be kidding. Postgres scales much better, is very reliable, has all the features of MySQL and then some. It's just slightly harder to manage at first (but the doc is excellent), and there's slightly less tools for it (but there's enough) At work we trust PG with financial transactions. We wouldn't trust them to Mysql. –  niXar Jun 26 '09 at 7:55
    
The original poster never said anything about financial transactions. You just said it your self "It's just slightly harder to manage" and "there's slightly less tools for it", For someone new to RDBMs and a "first website from hand-coded scratch" MyQL is a better choice than Postgres when it comes to Cost, Features, Performance, Easy of Use. –  DBAndrew Jun 26 '09 at 14:37

Use MySQL since it's free, and most hosts support it. There is alo PHPmySQL to provide a GUI when interacting with MySQL to make life simpler.

EDIT: Otherwise, I would use MS SQL Server because it has a cool SQL Management Studio where you can create stored procedures, tables and stuff making life much easier, and easy to integrate with ASP.NET C# and stuff..

share|improve this answer
    
MSSQL 2005 Express is free as well. –  Spencer Ruport Jun 25 '09 at 17:16
    
It sounds like he has access to all 4 included as part of his hosting package. And PostegreSQL is free and open source too. –  Matthew Flaschen Jun 25 '09 at 17:17
    
since his host is giving him those 4 choices I assume he doesn't have to pay for any, host is probably running SQL Server express version –  SQLMenace Jun 25 '09 at 17:18
    
@Spencer: MsSQL is free, but most free hosts on the net do not support it. @Matthew: If that is the case, I would go with MsSQL –  waqasahmed Jun 25 '09 at 17:18
    
@Spencer Ruport: MSSQL 2005 Express is free like in free beer, not like in free speach! MySQL is open source. –  Tim Büthe Jul 15 '09 at 7:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.