3 ms·
They can be useful if you need database independence. In Django it is literally a one line code change to swap out the DB you are using. Sure you can do the sa
by stonemetal 16y ago
They can be useful if you need database independence. In Django it is literally a one line code change to swap out the DB you are using.
Sure you can do the same thing with raw SQL but then you have deal with result sets, pulling data back out into objects etc. Why not automate that? ORMs still supply the ability to throw raw SQL when necessary.
I like the fact that I have one set of data objects to deal with and that they are in my language of choice.