5 ms·
I believe the authors point is that you have to use SQLAlchemy for that experience. Natively, the experience is much harder and that's why ORMs (like SQLALchemy
by TruffleMuffin 9y ago
I believe the authors point is that you have to use SQLAlchemy for that experience. Natively, the experience is much harder and that's why ORMs (like SQLALchemy) have been built. In MongoDB, the driver matches the command line interface 1-1, there is no need for a higher level wrapper so that you can use your database.
- dullgiulio 9y agoThat's actually a myth. One thing is Object Mapping, which is repetitive, but whenever there is a layer of indirection to "hide SQL from the developer", then there will be developer pain and waste of developer time. SQL is just a language and needs to be learned. It's not hard and being declarative it also teaches to think differently than imperative programming. Want to query in Javascript? Sure go ahead, but don't say SQL is harder.
- threeseed 9y ago> SQL is just a language and needs to be learned Assembler is just a language and needs to be learned. Oh wait. Nothing needs to be learned and there are always cases for higher up abstractions. Especially SQL which can get extremely complex if it needs to.
- MrFurious 9y agoDo you compare assembler with SQL?
- zaarn 9y agoI think a good ORM is one that isn#t just "hide SQL from the devs" and rather "hide trivial SQL from the devs and let them get dirty if they want to". Some ORMs I've worked with allowed me to completely bypass the ORM system while still getting most of the benefits. I do recall a ORM that I've use a long while ago that didn't support reading Views as objects but it could be trivially added simply by writing a custom query method which was unpacked like any other query into the object and that worked for Views then.
- dsirola 9y agoAnd then you have to maintain your own consistency layer in the application because you'll either duplicate data or use relations in Mongo like you would in a relational database.
- pritambaral 9y agoI've found there are few ORMs like SQLAlchemy. Most common ORMs hide the SQL, which is what you were talking about. With SQLAlchemy the SQL seeps out into the code, like SQL blending in with Python.