HHA504 / Cloud Computing / Assignment 4 / Flask and DBs / Part 1
This repo aims to: explores database management systems (DBMS) (storage, databases, querying)
- Connect Flask application to the local database created using SQLITE
GCP IP: http://35.194.3.120/
Tasks:
- Connect Flask to SQLITE
- Setup a local DBs on your machine(s) using SQLITE
- Create an SQLite DB that contains a patient table and a minimum of 4 additional columns for patient details beyond (MRN, first and last name, DOB)
- Create new fake patients/table using SQLalchemy
- Create a file called createDB.py in your repo that contains the source code for how these patients were created
- Inside your flask app, create a new route called ‘/patients’
- Within the patient-patients route, display the list of patients retrieve from the SQLITE DB
- Deploy to Azure or GCP and insert IP of machines in readme.md file in repo
Error encountered:
- [SOLVED] "sqlite3.OperationalError: no such table: patient_table"
- Attempted to change .db path to absolute path, but did not resolve the issue
- Encountered issue both on local machine and GCP
- To resolve the issue, I moved the patient.db from templates folder to main directory and including a / in patient.db in the app.py script