I find there's two things which Object-Relational Mappers like Django's provides. One infrequently useful one is relatively constructing queries from user input.
The other is versioning of your database schema, allowing you to easily upgrade and downgrade your databases. Not all ORMs provide this, but handcoding that logic I miss it.
Also I hear many developers don't like SQL's syntax, but I think that's a mix of it being overpowered for them and them haven't really had tried it.
@alcinnz Raises hand: used SQL all my life, possibly more than 20 years, I don't even remember. I hate it. It's a remnant from a long gone era that only makes sense for a few use cases. All useful data is linked, it makes no sense to link it at query time every time you run a query. I think multi-model keystore-document-graph databases like OrientDb and Arango (which provide a SQL-like interface on top) are a good compromise. Personally I prefer no SQL at all these days.
@haitch I can agree that whether you use SQL should be dependent on what data you have and how you want to use it.
If you're just using it to look things up by ID, SQL is more powerful then you need and you'd benefit from something simpler.
And if your data is "open world" (incorporates arbitrary external data) you'd benefit from using a language like SPARQL instead. Though not enough sites currently have this property.
But I like SQL for what it's good at.
@alcinnz And it's good at... ?
@haitch Analysing a finite/closed-world dataset.
@alcinnz 1) Is the schema mutable?
2) Does the data really represent documents, possibly with nested elements?
3) Is the data linked, with possibly several many to many relayionships?
4) Do you often find yourself writing LEFT OUTER JOIN?
5) Does the data have a graph-like structure and you sometimes nedd to find shortedt paths between data?
If any of these things is true, then SQL is not the best tool for the job. Nowadays, it almost never is unless there's legacy code involved.
@haitch I'm not sure that I agree on how rarely SQL is suited to your task, but I don't care enough to argue it further.
All I'm saying is don't discount SQL for your project because it's old. Discount it because you're not really processing your data, or because you need to deal with plenty of external data you don't want to or can't injest.