# Which d should I choose?

**URL:** <https://www.ruby-forum.com/t/which-d-should-i-choose/181913>\
**Category:** Rails\
**Created:** [January 20, 2010, 4:50am UTC](https://www.ruby-forum.com/t/which-d-should-i-choose/181913 "2010-01-20T04:50:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [January 20, 2010, 4:50am UTC](https://www.ruby-forum.com/t/which-d-should-i-choose/181913/1 "2010-01-20T04:50:48Z")

</div>

Hi  
I am planning to start a new rails project. I would like to know from  
two options mysql and postgresql which i should use? Can anyone please  
compare them?

Thanks  
Tom

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [January 20, 2010, 10:26am UTC](https://www.ruby-forum.com/t/which-d-should-i-choose/181913/2 "2010-01-20T10:26:13Z")

</div>

2010/1/20 Tom M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hi  
> Â I am planning to start a new rails project. I would like to know from  
> two options mysql and postgresql which i should use? Can anyone please  
> compare them?

The first thing to consider is which is available on the server where  
you plan to deploy the application.

If you have a free choice then postgresql is generally considered  
superior I believe.

Of course if you require the answer for a student assignment then  
google is the place to start your research.

Colin

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [January 20, 2010, 11:55am UTC](https://www.ruby-forum.com/t/which-d-should-i-choose/181913/3 "2010-01-20T11:55:17Z")

</div>

Hi Colin

Thanks for reply.Any other detailed links or thoughts broadly compares  
the merits/demerits ? Any thoughts?

Tom

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [January 20, 2010, 11:56am UTC](https://www.ruby-forum.com/t/which-d-should-i-choose/181913/4 "2010-01-20T11:56:57Z")

</div>

Additionally we have the authority to choose db since deployed on our  
server

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [January 20, 2010, 12:29pm UTC](https://www.ruby-forum.com/t/which-d-should-i-choose/181913/5 "2010-01-20T12:29:09Z")

</div>

I have, and continue to use both. As they both live behind ActiveRecord  
they  
are much of a muchness. They work and I don’t have to give them much  
thought.

If you are just using them as plain databases then flip a coin there is  
no  
real difference between the two. However in the companies that I have  
work  
in for the last 13 years as a web developer in Perl, Java and Ruby  
PostgreSQL has been used on almost all projects except three. MySQL was  
use  
on two projects (I can’t remember why we used them, I suspect it was a  
client requirement, but we had no issues with it) and MSSQL Server  
(definitely imposed by the client).

Personally I use MySQL for my own projects, but that was just because I  
had  
it installed.

To be honest PostgreSQL and MySQL are both solid and trusted databases  
that  
work well in large production environments and are well supported, it  
comes  
down to personal choice, just like the editor you write you code in (Vi,  
emacs or textmate?). People can become passionate about which editor /  
database they use but this doesn’t mean one is better than the other.

Flip a coin, heads install PostgreSQL, tails install MySQL.

Then get back to the important part, developing the application.

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [January 20, 2010, 12:12pm UTC](https://www.ruby-forum.com/t/which-d-should-i-choose/181913/6 "2010-01-20T12:12:10Z")

</div>

2010/1/20 Tom M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hi Colin
> 
> Thanks for reply.Any other detailed links or thoughts broadly compares  
> the merits/demerits Â ? Any thoughts?

I have little personal experience but Google for  
compare mysql postgresql  
yields many results.

Colin

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [January 20, 2010, 12:32pm UTC](https://www.ruby-forum.com/t/which-d-should-i-choose/181913/7 "2010-01-20T12:32:05Z")

</div>

It really depends on the type of application you wish to develop. For  
example, MySQL’s MyISAM database format is fast for applications that  
require more reads than writes, yet it doesn’t support transactions.

I would read up on the differences and choose your database for your  
specific application. The wonderful thing, however, is that rails will  
abstract most of it away so for a project that is just starting up it  
shouldn’t even matter; you could develop it with sqlite and figure it  
out later.

Jeff Aigner
