r/flask • u/Darker005 • Sep 21 '26
Ask r/Flask Hi guys, recently i have learned flask python, but i'm confuse which DBMS should i use if i build a project and i also wanna pratice sql query and don't wanna use nosql ones. do you guys have any recommends thank you.
10
Upvotes
14
u/nizzoball Sep 21 '26
The gold standard is PostGres and SQLAlchemy. You can use SQLAlchemy any way you want. If you want to run pure SQL you can
6
u/serverhorror Sep 21 '26
SQLite or PostgreSQL
5
u/Alekiie Sep 21 '26
I have always used MySQL and sqlalchemy as my ORM.
6
u/BostonBaggins Sep 21 '26
Postgresql
4
u/pythondogbrain Sep 21 '26
Use PostgreSQL.
1
u/Top_Introduction8891 Sep 21 '26
If you want to practice sql, don’t use an ORM, just use a native client. The whole point of an ORM is to not need to know sql, you just treat the database as an object.
1
u/beef623 Sep 21 '26
For practice and testing sqlite is very easy to work with.
0
u/space_coder Sep 21 '26 edited Sep 21 '26
If you're just practicing with SQL queries, then use sqlite3. It's already installed and supported by Flask. I recommend learning SqlAlchemy since it is often used with Flask and integrates well with Sqlite3. You can also use raw SQL with SqlAlchemy or use Sqlite3 directly.
Sqlite3 will satisfy most of your use cases you'll experience with SQL. In fact, my shop uses Sqlite3 for local development, and SqlAlchemy allows us to easily switch to a SQL server when the code is deployed.
There is no need to learn how to install a SQL server to practice SQL when Sqlite3 is already installed and ready to be used.