Update: 03/11/2025

Database Smartfat

Documentation

This is a fictional system in operation, created with the purpose of illustrating in a practical and accessible way how I carry out my work and prepare my documentation, particularly with regard to database analysis and development.

Introduction:

The objective of this work is to develop a system and a database aimed at optimizing the organization of critical information for a fictional gym called Smartfat, which has branches in the state of Rio de Janeiro and seeks to expand its operations. To achieve this, documentation was created, and PostgreSQL database implementation tools were utilized to ensure the system's efficiency and effectiveness.

The development process of the system and database was thoroughly studied and documented, encompassing all system requirements and the corresponding solutions devised to meet the gym's needs. The use of technological tools was essential in creating a system capable of managing the gym's key data and supporting its expansion.

With the database implementation, Smartfat will be able to efficiently manage information related to its students, instructors, branches, payments, plans, and activities. Furthermore, the adoption of the PostgreSQL platform enabled the creation of a secure and reliable system for managing the gym's data.

Mini-World:

The SmartFat is a gym chain present in various cities and states, with multiple branches. These units offer personalized training plans to students and rely on a dedicated team of employees to ensure smooth operations. The system was developed to register detailed information, monitor the financial performance of each branch, manage payments, and control the available equipment.

In terms of branch management, the system enables the complete registration of each SmartFat branch, storing information such as name, CNPJ (Brazilian company ID), ZIP code, address, address number, address complement, city, state (UF), phone number, and operational status (active or inactive). Each branch is linked to a specific state, referenced by the States table, which contains the UF, state name, and associated region. The Region table standardizes geographic regions. This branch data is recorded in the Branch table. Additionally, the Branch Status table defines the possible operational statuses of the branches, ensuring consistency in the records. The Country Code Phone table standardizes phone codes. A manager registers a branch by entering the data into the Branch table, selecting the state from the States table, and the status from the Branch Status table.

Regarding student registration, students are the primary focus of SmartFat, and their registration is handled by branch receptionists at the time of enrollment. The recorded information includes name, CPF (Brazilian ID number), gender, student ID, email, phone number, address, address number, address complement, city, state, ZIP code, and date of birth. This data is stored in the Student table. The "gender" field is referenced by the Gender table. The student’s enrollment is managed by the Student Enrollment table, which stores the enrollment number, plan type, enrollment date, enrollment status, expiration date, next payment date, and plan indicators (annual, semi-annual, quarterly, monthly, and loyalty). The enrollment status is linked to the Student Enrollment Status table, while the plan is associated with the Gym Plan table, which details the plan type, value, and description. During registration, the receptionist enters the data into the Student table, creates the enrollment in the Student Enrollment table, links the plan in the Gym Plan table, and sets the status in the Student Enrollment Status table.

In terms of payment management, student payments are recorded in the Payment table, which stores the student’s enrollment number, payment method, amount, due date, payment status, payment date, paid amount, confirmation code, and proof of payment. The Payment Method table defines the payment methods. The Payment Status table standardizes the statuses. When a student makes a payment, the system records the data in the Payment table, links it to the enrollment in the Student Enrollment table, selects the method from the Payment Method table, and updates the status in the Payment Status table.

For equipment control, the branches’ equipment is managed in the Equipment table, which stores the equipment description, condition status, value, specialization area, revision date, next revision date, and associated branch. The Conservation Status table defines the equipment conditions. The Specialization Area table categorizes the equipment. An equipment item is registered in the Equipment table, linked to a branch in the Branch table, with its condition defined in the Conservation Status table and its area in the Specialization Area table.

In employee management, employees are registered in the Employee Enrollment table, which stores the registration number, registration date, status, admission date, and an admission process indicator. The Employee Enrollment Status table defines the statuses. Personal data is saved in the Employee table, which stores name, CPF, gender, date of birth, email, phone number, salary, position, and employee enrollment number. The Position table lists positions and their descriptions. An employee is registered in the Employee Enrollment table, with personal data in the Employee table, status in the Employee Enrollment Status table, and position in the Position table.

For branch financial control, financial performance is monitored in the Monthly Branch Economy table, which stores the branch, month, year, revenue, expenses, cash balance, profit, last update date, and last update time. The Month table lists the months. The Year table records the years. Detailed revenues are stored in the Branch Revenue table, which includes the branch, revenue source type, amount, and receipt date. The Revenue Source Type table defines revenue sources with name, description, recurrence indicator, and category. Expenses are recorded in the Branch Expense table, which stores the branch, expense type, amount, and payment date. The Expense Source Type table categorizes expenses with name and description. The system records revenues and expenses in the Branch Revenue and Branch Expense tables, updating the financial report in the Monthly Branch Economy table with months and years from the Month and Year tables.

In the auxiliary table section, the Day of the Week table lists the days of the week, used for scheduling or attendance reports. The SmartFat system integrates all these tables to efficiently manage branches, students, payments, equipment, and employees, ensuring consistency and accuracy in the records.

Functional Requirements

Non-functional Requirements (NFRs)

This documentation is under development, please wait and check back soon for more updates...