The system was built with a strong focus on transactional integrity, concurrency control, and security, using PostgreSQL and Python (Flask). It includes mechanisms such as:
- ACID-compliant transactions
- Row-level locking (
SELECT FOR UPDATE) - Isolation levels (
REPEATABLE READ) - Trigger-based notifications
- Versioning of product data
- Python (Flask, psycopg2, JWT)
- PostgreSQL
- Docker & Docker Compose
- pgAdmin (for DB management)
- Postman (for API testing)
├── python/ # Python API source code
├── db/ # PostgreSQL script
├── er/ # Conceptual and physical database models (ER diagrams)
├── postman/ # Postman collection for API testing
├── report_PT/ # Report delivered
Make sure you have the following installed:
- Docker Desktop
- Postman
- pgAdmin
-
Configure the database:
- Create a PostgreSQL database.
- Update the Python source files with your DB credentials.
-
Edit Docker Compose:
- Modify
docker-compose-python-psql.ymlwith your DB settings.
- Modify
-
Start the architecture:
sh docker-compose-python-psql.sh
-
Import Postman collection:
- Open Postman and import the collection from the
postman/folder.
- Open Postman and import the collection from the
-
Monitor operations:
- Use pgAdmin to inspect database activity and validate transactions.
- Product versioning
- Unified Q&A table with boolean flag
- Concurrency control with locks and isolation levels
- JWT-based authentication
- Trigger-based notifications