Forum: Ruby on Rails DHH Interviewed by MySQL

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F68e4842b0a5487678e26046fdb2fdf3?d=identicon&s=25 softwareengineer 99 (Guest)
on 2006-02-11 05:03
(Received via mailing list)
I didn't see anyone post a link to David's Interview by Lenz here on the
list so I decided to post it.

  The interview can be accessed here:
  http://dev.mysql.com/tech-resources/interviews/dav...

  I was very happy to see the interview on PlanetMySQL as just the other
day I was talking about RubyOnRails on my MySQL blog which is
syndicated on PlanetMySQL
   (http://mysqldatabaseadministration.blogspot.com/20...)
   and was surprised to see that no one posted a comment about Rails.

  I am also very glad to hear about DHH's future plans of continuing to
support Rails but not like MySQL AB supports MySQL

  On the other hand, being a DBA, I was kinda disappointed at David's
following remarks:

  "I love MySQL because its fast and easy for the simple stuff. IÂ?m
entirely uninterested in fancy features like stored procedures,
triggers, and the like. So I hope nothing is being sacrificed while the
5.0 series chases these.    My advice would be to focus on enabling that
simple feature set to  go higher. Make clustering and other scaling
techniques even easier.  Perhaps baking in support for managing
partitioned data sets."

  I think stored procedures, triggers and events are very needed in
MySQL. Hope David is not worried about competition from MySQL :)

  MySQL users, I would love to hear your opinions on the above
statement.

  Frank
429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-02-11 05:39
softwareengineer 99 wrote:
> On the other hand, being a DBA, I was kinda disappointed at David's
> following remarks:
>
>   "I love MySQL because its fast and easy for the simple stuff. IÂ?m
> entirely uninterested in fancy features like stored procedures,
> triggers, and the like. So I hope nothing is being sacrificed while the
> 5.0 series chases these.    My advice would be to focus on enabling that
> simple feature set to  go higher. Make clustering and other scaling
> techniques even easier.  Perhaps baking in support for managing
> partitioned data sets."
>
>   I think stored procedures, triggers and events are very needed in
> MySQL. Hope David is not worried about competition from MySQL :)
>
>   MySQL users, I would love to hear your opinions on the above
> statement.

I think it's more along the lines of keeping everything in one layer.
See this:

Choose a single layer of cleverness
http://www.loudthinking.com/arc/000516.html

I'm sort of coming around to that way of thinking. I switched from MySQL
to PostgreSQL about two years ago and loved it. But now it DOES sound
appealing to just handle stuff in Ruby/Rails instead of switching to
pgsql for sprocs, constraints, triggers, etc. and then handling db
errors that arise from them.

Joe
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2006-02-11 07:21
(Received via mailing list)
On 2/10/06, Joe <joe@yahoo.com> wrote:
> I'm sort of coming around to that way of thinking. I switched from MySQL
> to PostgreSQL about two years ago and loved it. But now it DOES sound
> appealing to just handle stuff in Ruby/Rails instead of switching to
> pgsql for sprocs, constraints, triggers, etc. and then handling db
> errors that arise from them.

This is one case where I have no problem being unDRY.  The fact is
that for the apps I write, my Rails app isn't going to be the only
point of access to the DB.  Most of the time the DB is there long
before the Rails app anyway.  So there are two ways of handling things
that need checks, in my mind:

1. Write code to handle errors that pop up from the DB
2. Code the checks into the application itself

Sometimes it's easier and makes more sense to do #1.  In Rails, you
can achieve nearly all of the checks with one line of code, and
everything else with just a few.  You never even get to a point where
the database would create errors.

Anyway this is getting slightly OT.  Basically I just mean that I've
got no problem having two layers of cleverness.  It's necessary for me
to have a clever database, and easy for me to have a clever Rails app.
 The Rails app never sees the DB cleverness, which only exists because
other languages and people that access the DB aren't as bright.

Pat
429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-02-11 09:01
Pat Maddox wrote:
> On 2/10/06, Joe <joe@yahoo.com> wrote:
>> I'm sort of coming around to that way of thinking. I switched from MySQL
>> to PostgreSQL about two years ago and loved it. But now it DOES sound
>> appealing to just handle stuff in Ruby/Rails instead of switching to
>> pgsql for sprocs, constraints, triggers, etc. and then handling db
>> errors that arise from them.
>
> This is one case where I have no problem being unDRY.  The fact is
> that for the apps I write, my Rails app isn't going to be the only
> point of access to the DB.  Most of the time the DB is there long
> before the Rails app anyway.  So there are two ways of handling things
> that need checks, in my mind:
>
> 1. Write code to handle errors that pop up from the DB
> 2. Code the checks into the application itself
>
> Sometimes it's easier and makes more sense to do #1.  In Rails, you
> can achieve nearly all of the checks with one line of code, and
> everything else with just a few.  You never even get to a point where
> the database would create errors.
>
> Anyway this is getting slightly OT.  Basically I just mean that I've
> got no problem having two layers of cleverness.  It's necessary for me
> to have a clever database, and easy for me to have a clever Rails app.
>  The Rails app never sees the DB cleverness, which only exists because
> other languages and people that access the DB aren't as bright.
>
> Pat

Yeah, I'm redundant in this too. I've started using runner scripts more
to interact with models, but I still do a lot of interfacing via psql
and phppgadmin and not having data integrity protections in place at
that level would be playing with fire. They haven't interfered with
Rails or gotten in the way - things like validates_uniqueness_of happen
before a unique key in postgresql can generate an error.

Joe
F68e4842b0a5487678e26046fdb2fdf3?d=identicon&s=25 softwareengineer 99 (Guest)
on 2006-02-11 19:48
(Received via mailing list)
Thank you Pat and Joe for your comments.

  As far as my thoughts are concerned, MySQL needs SP and triggers so it
won't loose DBAs to PostgreSQL.

  I asked the same question on my MySQL blog
(http://mysqldatabaseadministration.blogspot.com/20...)
to database administrators and got some very interesting replies:

  Markus, a recognized MySQL DBA put the opinions of many MySQL DBA's in
excellent words on his site:
  http://db4free.blogspot.com/2006/02/entirely-unint...

  I present a quote from above:

  "MySQL simply *needs* features like Stored Procedures, User Defined
Functions, Triggers etc. to be taken serious on the database market! So
long has MySQL been criticized for not providing them - now as they
have been introduced, it would be stupid to criticize MySQL *for*
providing them.

  MySQL has a very good chance to get as advanced  as any other database
system without losing it's simplicity. I don't  think that performence
will suffer a lot in the long run, because  performence optimizations
will certainly go on forever and will  certainly overcome the speed
decreases that may come from implementing  new features. On the other
hand, the other database systems will hardly  ever have a chance to
become as convenient to work with as MySQL (of  course, people will
always like what they are used to - if somebody has  always worked with
another product, he'll be more comfortable with this  than with another
- but for new users, MySQL is probably less painful  to start with than
the others).

  The great thing is - people can  still work with MySQL 5.0 the way
that they were used to with earlier  versions. They can decide whether
to use the new features, or not. And  that's exactly the right way for
MySQL! Continuing to get as advanced  as possible without breaking
downward compatibility - where possible  (and useful)."

  Another anonymous commenter said that if it wasn't for the SP and
triggers he wouldn't have converted from MSSQL to MySQL.

  While Rails is a wonderful framework, and Ruby an excellent language,
I  believe there is a strong need for these features. Somethings are
just  better left to the database. For example, I can think of many
situations, where the DRY can be applied in a better way by using
triggers.


  -- Frank

Pat Maddox <pergesu@gmail.com> wrote:  On 2/10/06, Joe  wrote:
> I'm sort of coming around to that way of thinking. I switched from MySQL
> to PostgreSQL about two years ago and loved it. But now it DOES sound
> appealing to just handle stuff in Ruby/Rails instead of switching to
> pgsql for sprocs, constraints, triggers, etc. and then handling db
> errors that arise from them.

This is one case where I have no problem being unDRY.  The fact is
that for the apps I write, my Rails app isn't going to be the only
point of access to the DB.  Most of the time the DB is there long
before the Rails app anyway.  So there are two ways of handling things
that need checks, in my mind:

1. Write code to handle errors that pop up from the DB
2. Code the checks into the application itself

Sometimes it's easier and makes more sense to do #1.  In Rails, you
can achieve nearly all of the checks with one line of code, and
everything else with just a few.  You never even get to a point where
the database would create errors.

Anyway this is getting slightly OT.  Basically I just mean that I've
got no problem having two layers of cleverness.  It's necessary for me
to have a clever database, and easy for me to have a clever Rails app.
 The Rails app never sees the DB cleverness, which only exists because
other languages and people that access the DB aren't as bright.

Pat
429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-02-11 20:16
A few more negatives for me against MySQL are:

- its licensing (which is confusing - even their reps couldn't explain
it).
- its deviance from SQL conformance (which every database has, but
MySQL's is much more so).
- its confusing array of database engines (and the uncertainty of InnoDB
since Oracle's acquisition).
- its worse performance (for me anyway) due to table locking issues, and
tables getting corrupted/wedged from time to time.

MySQL can do whatever they want ;). I don't anticipate ever going back
as a developer. But choice and competition are good :).

Joe
A52b0e1c5d982f2512a03c5dbfd033d6?d=identicon&s=25 Dick Davies (Guest)
on 2006-02-13 15:23
(Received via mailing list)
On 11/02/06, softwareengineer 99 <softwareengineer99@yahoo.com> wrote:

> I think stored procedures, triggers and events are very needed in MySQL.

But the interview was about what DHH thinks, not you :)
He's said several times before that Rails prefers an 'application
database' to an
'integration database', and he prefers to put that checking in the
model rather than
the db.

I suspect most mysql users don't need those features, or they
wouldn't be mysql users.


--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/
This topic is locked and can not be replied to.