Hacker News new | past | comments | ask | show | jobs | submit login
Ode to Sequel (twin.github.io)
61 points by kristianp on July 31, 2015 | hide | past | favorite | 15 comments



Even when you're not using it for your app, sequel + irb make a nice database repl, especially useful if you want to transform and analyze some data with Ruby methods or need to work with several databases at once.


Yes, multiple databases are really useful for me, for some reason I often need to transfer data from one to another, e.g. legacy database to a new improved one (which I think happens often if you're in a non-startup).

In ActiveRecord you would have to specify for each model to which the database to connect. And then you have to figure out how to call a User model in one database, and how in the other (you have to call them differently, even if table names are the same). I think it can get pretty chaotic with something bigger.


We do a lot of small apps with Sinatra, shared postgres database and sequel.

Since we are very data and database centric, sequel is all we ever wanted since it supports all advanced pg constructs.


I don't do Ruby anymore, but back when I first started I did a little side project with Sinatra and Sequel and definitely enjoyed it over ActiveRecord. As another user said, now that I'm a Python programmer, I have always been drawn to SQLAlchemy in a similar way.


As someone who hasn't worked with Ruby in a while, I'm curious to hear if anyone has opinions on how Sequel compares to DataMapper.


Sequel is live, Datamapper is dead and Rom is about to be born.


Sequel is an absolute joy to use. I've not seen a better thought-out ORM. Jeremy's support efforts are exemplary as well.


As someone who is just dipping my toes into Rails (but has used plenty of other ORMs in other languages): ActiveRecord doesn't have native left join support?!

I'm really glad I came across this before starting my first Rails project. Thanks for the post!


I had a similar experience switching from Django's ORM to SQLAlchemy.

The useful part of SQLAlchemy is the SQL library part. The ORM built on top, while nice, is entirely optional.


SQLAlchemy does have the issue that, as far as I know, you can't use it "entity-less": you always need to have Table and Column objects instantiated (possibly via reflection, but still…). That you can use sequel solely for query building without needing any kind of backing objects is neat.


white on white text \w Javascript. Why can't you use black by default? And no, I don't want to enable Javascript just to read an article.


Sorry for that, fixed.


It's nice to see people still finding and taking interest in Sequel. It was always my favorite ruby ORM. :)


Sequel is the bee's knees


Enjoyed the article, it describes most of the issues I had with ActiveRecord.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: