1

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.

1
  • 2
    What language? or is that selectable too?
    – Jeremy
    Jun 25, 2009 at 17:18

15 Answers 15

5

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.

1
  • 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, 2009 at 8:03
5

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.

4

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

3

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.

2

This all depends on the:

  • skillset you already have
  • time investment you can make
  • budget constraints
  • web framework you choose
2

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.

1
  • MS SQL is pretty much all pervasive on shared hosting platforms too.
    – Kev
    Jun 25, 2009 at 17:20
0

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.

2
  • 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. Jun 25, 2009 at 17:32
  • Neither can MS SQL Server. Jun 25, 2009 at 20:01
0

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.

0

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.

0

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.

0

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.

0
0

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.

2
  • 1
    What's better about MSSQL than Postgres, price/freedom notwithstanding?
    – niXar
    Jun 26, 2009 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. Jul 15, 2009 at 8:41
0

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.

-3

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.

2
  • 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, 2009 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, 2009 at 14:37
-3

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..

5
  • MSSQL 2005 Express is free as well. Jun 25, 2009 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. Jun 25, 2009 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, 2009 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, 2009 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, 2009 at 7:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .