uprm-inso4116-2024-2025-s1 / semester-project-SafeRUM

semester-project-safeRUM created by GitHub Classroom
9 stars 1 forks source link

Add database-related boilterplate code #57

Closed joel-alvarado closed 1 month ago

joel-alvarado commented 2 months ago

Task: Add Database-Related Boilerplate Code

Revised: This task does not consider heavily consider error handling. Error handling must be the subject of a separate task.

Objective

The goal of this task is to set up the foundational database-related code that will allow interaction with the existing schema, which includes users, admins, reports, and alerts tables. This code will act as the boilerplate for connecting, querying, and managing the database for the SafeRUM app.

Task Description

This task involves creating boilerplate code for database management in the SafeRUM app. The focus will be on setting up a database connection, creating basic functions for interacting with users, admins, reports, and alerts tables. This code will serve as the base for all future interactions with the database and should follow best practices for security, scalability, and performance.

The boilerplate will include functions for basic CRUD (Create, Read, Update, Delete) operations on each table, as well as setting up configurations for connecting to the database (e.g., credentials, environment settings, and connection pooling).

Implementation

Subtasks

  1. Create database connection code and test the connection with the existing schema.
  2. Implement boilerplate CRUD functions for user and admin tables.
  3. Add CRUD operations for the users, admins, reports, and alerts tables.
  4. Set up a configuration file for database credentials and connection settings.

Testing and Debugging:

Deadline: (Revised: This task carried on to M2 from M2.) The CRUD operations for the admins, users, alerts and reports table will be completed by

joel-alvarado commented 1 month ago

@evnd04 Re-opening because I accidentally added the completed label and it's supposed to be assigned to @shenied-maldonado

shenied-maldonado commented 1 month ago

After having discussed this with our DB manager, we agreed to implement CRUD operations as they become necessary. For this first milestone, we deemed user registration as the main focus for developing CRUD functions. A separate issue was opened for this and others will follow, leaving this as a parent task.