Choosing a Database

May 17th, 2009 by Vikido

Choosing a database is a major decision for us (as with any young start-up). Once decided on, it will be hard to change the db both in terms of data migration and rewriting major chunks of code.

We’re taking into consideration ease-of-use, performance, scalability and price. The fact we’re using PHP is also a key player in the decision.

Please assist by commenting to this post about your db of choice. Bad-mouthing the other dbs will also help us decide.

22 Responses to “Choosing a Database”

  1. טל says:

    There are so many things to take into consideration before choosing a db that it will require much more information in order to provide an educated suggestion.
    Every database has its own strengths and weaknesses. For example, an oracle db will be the best for scalability and performance (for big databases). On the other hand, price and ease-of-use are not among its strengths. Of course, no one can beat MySql’s Price.
    My advice would be to use database that your database professional is most comfortable with. if you don’t have a database guy, get one because it looks like your application will require a lot of database heavy lifting. It is important to take into consideration the cost of the human factor (training and salaries) because it varies between db’s.
    For bootstrapping, I would start with MySql and try to write database agnostic code. This will help if you will need to switch the db later.
    Just my $0.02. ( am I really the first commenter on this blog?)

  2. have a look here (http://www.mail-archive.com/couchdb-user@incubator.apache.org/msg01506.html) about the first question you should ask, table based vs. schema-free document-oriented database.

    Have you considered aws?
    (you probably did)

    Anyway, to get hte best answeres for this kind of question you should post this question at http://news.ycombinator.com/ (and some others that will come by as you progress wit hthe startup)

  3. Unless you’re building a super real time web application – there is no real question IMO. If you’re using PHP go with mysql (or postgresql if you’re more adventures).

    BTW – I know it may sound fanboy-ish, but have you considered RoR instead of whatever PHP framework you’re using?

  4. I really liked this post. Can I copy it to my site? Thank you in advance.

  5. Yair says:

    If you need a full scale relational DB, I’d go with MySQL. If all you actually need is a large and efficient hash table, I would check out some other alternatives. In this post I describe the alternative that I’ve been using, and there is a link inside the post to a detailed survey of other alternatives. Good luck!

  6. Danniel says:

    I generally vote for mysql it’s a good DB just about anyone can be a DBA with it (good for the beginning and good for replacing the IT squad).

    but more info on what its about to do would prove useful…

    good luck!

  7. Shaharf says:

    I say go with mysql…
    It’s great for startups and can grow into an enterprise

  8. Kelly Brown says:

    Hi, interest post. I’ll write you later about few questions!

  9. Refael says:

    If you go PHP, go MySql.
    But I’m with the people saying reconsider, the whole approach, and go Schema less, and consider the Python/Google-App-Engine/BigTable.

  10. Yami says:

    Thank you all for your suggestions. Due to popular demand we have chosen MySql. I hope we would not regret it when we have to scale up…

  11. טל says:

    I don’t think you will regret. If there is one thing we can safely expect from Oracle’s acquisition of Sun, it is that they will offer a way to scale up from a free software to their paid version.

  12. Yair says:

    Go for MySQL – will cost you nothing at this early stage of your company.
    I recommend your read at Wikipedia (and other sources) about LAMP – Linux, apache, mysql , Php way of application development.
    Also, if possible, develop your code in such a way, that if needed, database can be easily replaced (this can happen during development stage o course, and almost never occurs during production stage).
    Try to use as many open source tools as you can.
    I , for example, use Ubuntu as desktop, CentOS as server operating system, Java as development language, and mysql as database:)

  13. Shahar says:

    I think MySQL is a very wise choice, regardless of the language (PHP is also a very wise choice, regardless of the DB – don’t listen to any fanboy who says otherwise without giving a very good reason (; ).

    In any case make sure you use a good abstraction layer – most of the good PHP frameworks out there (ZF, ezComponents, etc.) offer a good one. PDO is good but try to use a layer that will have you write zero or minimum SQL yourself – this way migration should be easier.

    That is of course, unless you want to be super optimal and know for sure you will not need to migrate (my guess is that you won’t need to if you use MySQL right).

  14. Oded says:

    With MySql, your app will always stay “My”, but will not grow smoothly into “everyone”.

    Start with a free version of Oracle (there is such a thing: Oracle Express) or Sql server desktop.

    When you grow, the code remains the same, but the deployment scales.

    If you want to know more, send email for an in depth talk.

  15. Oded says:

    First read my comment above

  16. hamancal says:

    I think an important thing to consider is the Ruby-on-rails platform. Theoretically I shouldn’t be recommending to use it as you’ve stated you wish to use PHP.
    However in my experience, Ruby can boost development times as well as manage DB schemes (it’s actually a very cool engine to use). It natively works with MySQL.
    btw, I didn’t forget the additional costs of learning the platform.

  17. Alma says:

    I think that the framework choice is much more important than the database choice.

    If you insist on PHP I would suggest Kohana.
    Otherwise, definitely go web2py.

  18. mr x. says:

    The Database is one of the most crucial decisions, the foundation of any project and beholds its future potential of success. I was suprised of the “shortness” of the debate that lead to your decision, I hope inhouse there was a much more meaningfull debate.

    Without going into development issues here are some business aspect:
    1/ check that the licensing options is suitable to your future needs.
    2/ if the product is to be sold to clients (keep total cost low) the DB should be a cheap solution that can give the needed outcomes.
    3/ if centrelised app – go for the most expensie such as MSSQL, this will insure product effectiveness, scalability, and any future dev.
    4/ mixed option – if time is not an issue build the query application outside of the main App, and provide optional query files for any DB chosen. this will be smart even if you choose a db and will enable you to make changes in source DB.

  19. Linuxem says:

    Hi,

    For my opinion you should take MySQl it is free and robust data base

    from Sun Microsystems ( Or we could say Oracle )

    Good luck

    Eli Maor

  20. mark says:

    You can use MySQL it’s easy to use,got a fast performance reliable, all LAMP use it today as standard and it runs on a variety of platforms from small to large scale websites with huge traffic. In fact i believe it’s the best freeware on the market.
    Good luck.

  21. Andrey says:

    My 5c -

    The vast amount of community experience and knowledge is unprecedented with MySQL 5.0.
    I’m almost certain that you will not encounter a problem with MySQL
    that wasn’t encountered and solved by someone else. This will definitely ease your development efforts.

    Regarding scalability – by the time you will need to scale – MySQL 5.4 will become stable. Apart from major increase in performance, this version includes many improvements in scalability field.
    You can take a look here:
    http://dev.mysql.com/doc/mysql-5.4-features/en/index.html

Leave a Reply