DailyJS: The State of Node and Relational Databases
I am a big fan of relational databases, having used them for many years now. I’m slowly trying to get my head wrapped around NoSQL options, and in fact have to work with CouchDB (now Couchbase) and Elastic Search at my job. But for most applications, I can ‘make sense’ of using a relational database over a non-relational one more often than not.
I’m also slowly getting into Node (server-side JS) more and more, but I haven’t dived completely in yet. So this article was very interesting to me, to get a broad overview of the options. Alex Young, the author, breaks up the various options this way (along with examples for each):
- Driver – mysql and pg
- Abstraction Layer – relational, any-db, and massive
- Validator – jayschema, validator, and conform
- Query Generator – sql
- Schema Management – Sequelize and db-migrate
I’ve not included links to each on purpose. I think you should read the whole article if you’re interested, or at the least give Alex the inbound traffic out of courtesy and respect. 😉
He concludes by stating that even though there’s a strong anti-ORM (Object-Relational Mapping, an abstraction technique that turns relational database entries into objects) sentiment amongst the Node community, there are still some interesting projects like relational coming up.
He mentions briefly the progress that PostgreSQL has made (included by default when using Heroku), and also that MariaDB exists as a drop-in replacement for MySQL and has a non-blocking Node module. The comments are also sure to be a treasure-trove of implementation notes from others.