[!WARNING] This is an illustrative Design Decision; replace with your own content.
You may delete this
!WARNINGbox.
| Property | Value |
|---|---|
| Status | 🟢 Decided |
| Updated | 30 Oct 2026 |
| Lead | Jane Dane |
Should we perform database CRUD (create, read, update, delete) operations by writing plain SQL or by using SQLAlchemy as object-relational mapper?
Our web application is written in Python with Flask and connects to an SQLite database. To complete the current project, this setup is sufficient.
We intend to scale up the application later on, since we see substantial business value in it.
Therefore, we will likely:
We stick with plain SQL.
Our team still has to come to grips with various technologies new to us, like Python and CSS. Adding another element to our stack will slow us down at the moment.
Also, it is likely we will completely re-write the app after MVP validation. This will create the opportunity to revise tech choices in roughly 4-6 months from now.
Decision was taken by: Jane Dane, John Doe
We regarded two alternative options:
| Criterion | Plain SQL | SQLAlchemy |
|---|---|---|
| Know-how | ✔️ We know how to write SQL | ❌ We must learn ORM concept & SQLAlchemy |
| Change DB schema | ❌ SQL scattered across code | ❔ Good: classes, bad: need Alembic on top |
| Switch DB engine | ❌ Different SQL dialect | ✔️ Abstracts away DB engine |