This project allows you to compare two ways of working with a database:
- Using raw SQL queries.
- Using an ORM, in this case, SQLAlchemy.
To use this project, follow these steps:
- Install Docker Desktop.
- Install VS Code.
- Install the Dev Containers extension for VS Code.
- Clone the repository and open it in a Dev Container. To do this:
- Open VS Code.
- Go to View/Command Palette...
- Run Dev Containers: Clone repository in a named container volume.
- You need to configure an
.envfile with the database connection variables. - In the
src/sqlfolder, you will find a sample database that you can use. - The ORM models are defined in the
src/modelsfolder. - The files
main_sqlalchemy.pyandmain_sql.pyare the ones you should use to run the project.