/CRUD-Operations-University-Lab

A Flask web app that implements CRUD operations to a database called cvProject

Primary LanguageHTML

CRUD Operations Lab

How to Run the Project

  1. Clone the repository to your local machine.
  2. Install the dependencies listed in the requirements.txt file using pip install -r requirements.txt.
  3. Set up the database connection parameters in the db.py file.
  4. Run the Flask application using python app.py.
  5. Access the application in your web browser at http://localhost:5000.

How to Setup the Environment

  1. Ensure thay you have a compatible mysql or mariadb.
  2. import the cvProject.sql database
  3. Install the dependencies listed in the requirements.txt file using pip install -r requirements.txt.

Quick Usage Guide

Inserting a Person

To insert a new person into the database, follow these steps:

  1. Navigate to the insert person form in the web application.
  2. Enter the person's details (e.g., first name, last name, etc.).
  3. Click the "Submit" button to insert the person into the database.

Updating a Person

To update a person's details in the database, follow these steps:

  1. Navigate to the update person form in the web application.
  2. Enter the person's ID or other unique identifier.
  3. Modify the person's details as needed.
  4. Click the "Update" button to save the changes to the database.

Count Persons by Country

To know how many persons share the same country:

  1. Navigate to the count persons by country form in the web app

  2. select the country you want to count persons in

  3. click the Count Persons By Country button to be redirected to the aggregate result page

Etc. with the rest of web app forms