Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's common to use SQLAlchemy with Flask, so the answer depends on how comfortable you are with that ORM.

That being said, you should absolutely at least learn the basics of working directly with databases. ORMs are a leaky abstraction, and you will run into situations where it's easier to drop into raw SQL to get the job done. Think of it like this: using GPS while driving is fine 95% of the time, but when it malfunctions or breaks, you're screwed unless you know how to read a map or ask for directions ;)



SQL are a leaky abstraction too, and ORMs get rid of an extremely high amount of common beginner errors.

Using raw SQL instead of an ORM is one of the best examples of premature optimization I can think of (unless you are very very good at SQL and have a very complicated structure).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: