CrudVision – Lisa Seelye

August 19, 2007

Forsaking SQL?

Filed under: rails,ruby,sql — Lisa Seelye @ 11:30

Whenever I need to make a change to data in a Rails-based table I very rarely use a GUI, in fact, the only time I have used a GUI is for Oracle (and we all know how I feel about that). Instead I favour the rails console.

For me I find it easier to use the console because it reinforces the ORM – an entry in the table is just an instance of a class that models that table. I find that Constellation.find(:all, :conditions => "faction_id = 0").each { |c| c.faction_id = nil ; c.save! } is more meaningful (and easier) than sorting by the value of that column and mass updating. Icky :)

When I need to construct weird SQL queries, however, I’ll drop to the mysql or psql shells. GUIs are icky and their bulky interfaces tend to slow complex queries down. Of course, I’m a console geek so I’m slightly biased here.

Anyways, I cringe a little when I see people opening SQL GUIs to find table structure or to find data values and to change single values. But hey, different strokes for different folks!

1 Comment »

  1. I tend to use MySQL Administrator/Query Browser for the more complex things- stored procedures, views, and so on- but only for generating queries, mostly… I’m with you on the MySQL console- it’s much nicer to be down at the same level as the data instead of going through a GUI. And there’s the fact there’s no limitations- I can do a SHOW PROCESSLIST or SHOW VARIABLES really easily in a console, but not at all in a GUI. PHPMyAdmin is a nice app in that respect.

    Comment by James Harrison — August 19, 2007 @ 14:00

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress