Best Database for a Nuby?

I have no prior experience with a database, and am trying to figure out
which one to go with.

I was going to go with MySQL (rather than Postgres, which seems to be
considered superior) because it had more documentation and my app is
very basic, but I read that it only allows for 1 index per table, which
worried me – although I don’t know if it’s actually something to be
worried about.

So all in all, are Postgre’s advantages worth it even if my knowledge is
very limited and my app very basic? Thank you for any help.

On 18 Aug 2008, at 10:34, Kyle M. wrote:

worried about.
That’s absolute bollocks. what you might have read and misinterpreted
is than when a given query is executed, no more than one index will be
used per table.

For example if you had an address book app and you had one index on
say state and one index on occupation and you execute a query against
that table then mysql will use either the index on state or the index
on occupation (or neither if neither one helps) but never both indexes
(although you can create an index on both columns)

So all in all, are Postgre’s advantages worth it even if my
knowledge is
very limited and my app very basic? Thank you for any help.

Use what you’re most comfortable with.

Fred

On Mon, Aug 18, 2008 at 7:34 PM, Kyle M.
[email protected] wrote:

I have no prior experience with a database, and am trying to figure out
which one to go with.

Use the default in Rails 2.1 which is SqlLite.

SQL Lite is a good database that works out of one file in your apps
home directory. The advantage is you don’t have to set up a server or
permissions or anything like that. It just works.

This will give you the least headaches.

Mikel

Rails, RSpec and Life blog…

Frederick C. wrote:

On 18 Aug 2008, at 10:34, Kyle M. wrote:

worried about.
That’s absolute bollocks. what you might have read and misinterpreted
is than when a given query is executed, no more than one index will be
used per table.

For example if you had an address book app and you had one index on
say state and one index on occupation and you execute a query against
that table then mysql will use either the index on state or the index
on occupation (or neither if neither one helps) but never both indexes
(although you can create an index on both columns)

Got it. Thank you.

Mikel L. wrote:

On Mon, Aug 18, 2008 at 7:34 PM, Kyle M.
[email protected] wrote:

I have no prior experience with a database, and am trying to figure out
which one to go with.

Use the default in Rails 2.1 which is SqlLite.

SQL Lite is a good database that works out of one file in your apps
home directory. The advantage is you don’t have to set up a server or
permissions or anything like that. It just works.

This will give you the least headaches.

Mikel


http://lindsaar.net/
Rails, RSpec and Life blog…

I should have clarified – this is for production. I’ve been using
SQLite for development. I’ve heard MySQL or Postgres are better for
production, which brought me here.

Kyle,

On Aug 18, 5:34 am, Kyle M. [email protected]
wrote:

very limited and my app very basic? Thank you for any help.
Nope. We use MySQL for most of our Rails apps, mainly due to it’s
popularity. It’ll take a while before you get to the point where the
underlying database is actually your bottleneck, and even then there
are tradeoffs with any database system.

MySQL will be fine. If you app is really simple and doesn’t get a ton
of traffic, I’d even recommend using SQLite. I use it a lot for
development and even in production on some small apps.

Hope that helps,
Brandon


Hands-on Training In a Vacation Setting
Sessions By Collective Idea: http://sessions.collectiveidea.com