3 ms·
And yet this is reality: again 99% of applications manipulate objects in code, persist the data in relational databases, and map rows to objects just fine. Some
by manigandham 9y ago
And yet this is reality: again 99% of applications manipulate objects in code, persist the data in relational databases, and map rows to objects just fine. Some mapping is necessary anyway, and from my experience modern ORM frameworks actually handle complex objects and relations much better than fragile hand-written code.
As mentioned, if you're in the 1% scenario where this approach doesn't work then you already know you should be using something else. Not knowing when to use what is a far bigger issue than any problem an ORM can cause.
- marcus_holmes 9y agoI think it's more 99% of databases are warped horribly to pretend that objects map to tables. If you throw away the concept that anything in your database has to map to anything in your code base, then you design better databases. Different databases, more to the point.
- manigandham 9y agoOh ok, so your code just doesn't deal with data in the database then? I dont understand what point you're trying to make here. You can lay out your tables however you want, and you can then map them to objects using an ORM. That's what mapping means, to translate from domain to another. There's no limit on how things are actually designed and ORMs usually do a much better job of handling all that bulk code for you. Nothing is stop you from writing SQL yourself if you really need something complex but again, you should know when and where that is.