Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LuisAMoralesA/tallerIngles-UAEMEcatepec/llms.txt
Use this file to discover all available pages before exploring further.
The tallerdeingles MySQL database contains 11 tables organized into catalog tables (read-only reference data seeded at setup) and operational tables (created and updated at runtime by the application). All JDBC access is performed through PreparedStatement inside the BaseDatos class — raw SQL strings are never built from user input.
Diagrama de relaciones (resumen)
The diagram below summarizes every foreign-key relationship in the schema. Nullable FKs are marked with (nullable).
| Tabla origen | Campo FK | Tabla destino | Campo referenciado | Nullable |
|---|
students | id_user_student | users | id_user | No |
students | id_teacher_student | teachers | id_teacher | Sí |
students | id_report_student | report | id_report | No |
students | id_payment_student | payment | id_payment | No |
teachers | id_user_teacher | users | id_user | No |
teachers | id_group_teacher | grupos | id_group | Sí |
grupos | id_grade | grade | id_grade | No |
grupos | id_category_group | category | id_category | No |
payment | payment_status | payment_status | id_status | No |
admin_school | id_user_admin | users | id_user | No |
Nullable FKs arise because a student may not yet be assigned to a teacher/group, and a teacher may not yet be assigned to a group. The desvincularProfesores, desvincularAlumnos, and desvincularGrupo methods in BaseDatos SET these fields to NULL before cascaded deletes.
Tablas
users
Central authentication table. Every person in the system — administrator, teacher, or student — has exactly one row here. Usernames are auto-generated by the registration servlets using a deterministic formula derived from the person’s name and date of birth.
| Campo | Tipo | Descripción |
|---|
id_user | INT PK AUTO_INCREMENT | Identificador único del usuario |
nom_user | VARCHAR | Nombre de usuario (auto-generado por el servlet de registro) |
password | VARCHAR | Hash SHA-256 de la contraseña en formato hexadecimal (64 caracteres) |
rango | VARCHAR | Rol del usuario: ADMINISTRADOR, MAESTRO, o ESTUDIANTE |
Passwords are hashed using SHA256.contraseñaNueva(String) before insertion and are never stored in plain text. The inicioSesion method rehashes the submitted password and compares digests.
admin_school
Personal data for school administrators. Linked 1-to-1 with users via id_user_admin.
| Campo | Tipo | Descripción |
|---|
id_admin | INT PK AUTO_INCREMENT | Identificador único del administrador |
id_user_admin | INT FK | Referencia a users.id_user |
apellido_paterno_admin | VARCHAR | Apellido paterno |
apellido_materno_admin | VARCHAR | Apellido materno |
nombre_admin | VARCHAR | Nombre(s) de pila |
fecha_nacimiento_admin | DATE | Fecha de nacimiento |
telefono_admin | VARCHAR | Número de teléfono |
email_admin | VARCHAR | Correo electrónico |
teachers
Personal and assignment data for teachers. Each teacher may be assigned to at most one group (id_group_teacher); if unassigned, this field is NULL.
| Campo | Tipo | Descripción |
|---|
id_teacher | INT PK AUTO_INCREMENT | Identificador único del profesor |
id_user_teacher | INT FK | Referencia a users.id_user |
apellido_paterno_teacher | VARCHAR | Apellido paterno |
apellido_materno_teacher | VARCHAR | Apellido materno |
nombre_teacher | VARCHAR | Nombre(s) de pila |
telefono_teacher | VARCHAR | Número de teléfono |
email_teacher | VARCHAR | Correo electrónico |
fecha_nacimiento_teacher | DATE | Fecha de nacimiento |
status_teacher | VARCHAR | Estado de actividad: Activo o Inactivo |
id_group_teacher | INT FK nullable | Grupo asignado — referencia a grupos.id_group; NULL si sin grupo |
classroom_teacher | VARCHAR | Identificador del salón de clases asignado |
students
The largest operational table. Each student row references its own payment record, report record, and users record created atomically by the addStudent servlet. The id_teacher_student FK is nullable — students are enrolled without a group assignment and linked to a teacher later.
| Campo | Tipo | Descripción |
|---|
id_student | INT PK AUTO_INCREMENT | Identificador único del alumno |
id_teacher_student | INT FK nullable | Profesor/grupo asignado — referencia a teachers.id_teacher; NULL si sin grupo |
id_report_student | INT FK | Registro de calificaciones — referencia a report.id_report |
id_payment_student | INT FK | Registro de seguimiento de pagos — referencia a payment.id_payment |
id_user_student | INT FK | Referencia a users.id_user |
apellido_paterno_student | VARCHAR | Apellido paterno |
apellido_materno_student | VARCHAR | Apellido materno |
nombre_student | VARCHAR | Nombre(s) de pila |
telefono1_student | VARCHAR | Teléfono principal |
telefono2_student | VARCHAR | Teléfono secundario |
fecha_nacimiento_student | DATE | Fecha de nacimiento |
email_student | VARCHAR | Correo electrónico |
sale_solo | BOOLEAN (TINYINT 0/1) | 1 si el alumno tiene autorización de salir solo del plantel, 0 si no |
When id_teacher_student is 0 in the Java Students object, insertarEstudiante stores NULL via pstm.setNull(1, java.sql.Types.INTEGER). The same logic applies to updates in actualizarEstudiante.
grupos
Defines the class groups offered each semester. A group is characterized by a grade level, a numeric level within that grade, a category (Children/Teens), and a classroom.
| Campo | Tipo | Descripción |
|---|
id_group | INT PK AUTO_INCREMENT | Identificador único del grupo |
id_grade | INT FK | Nivel académico — referencia a grade.id_grade |
level_group | INT | Nivel numérico dentro del grado (p. ej. 1, 2, 3…) |
id_category_group | INT FK | Categoría de edad — referencia a category.id_category |
classroom_group | VARCHAR | Identificador del salón donde se imparte el grupo |
grade
Catalog table for academic levels. Seeded with the three levels used by the workshop.
| Campo | Tipo | Descripción |
|---|
id_grade | INT PK AUTO_INCREMENT | Identificador único del nivel |
description_grade | VARCHAR | Descripción del nivel: Basico, Intermedio, o Avanzado |
category
Catalog table for student age categories.
| Campo | Tipo | Descripción |
|---|
id_category | INT PK AUTO_INCREMENT | Identificador único de la categoría |
description_category | VARCHAR | Descripción de la categoría: Children o Teens |
report
Stores the grade record for one student for one semester. Created atomically with the student row in addStudent; first_partial_report and second_partial_report default to 0.0. The avg_report field is computed by the updateGrade servlet as (firstPartial + secondPartial) / 2.
| Campo | Tipo | Descripción |
|---|
id_report | INT PK AUTO_INCREMENT | Identificador único de la lista de calificaciones |
first_partial_report | DOUBLE | Calificación del primer parcial |
second_partial_report | DOUBLE | Calificación del segundo parcial |
avg_report | DOUBLE | Promedio final calculado por el servlet updateGrade |
payment
Tracks payment status for one student for one semester. Flags are stored as TINYINT (0/1) in MySQL and mapped to Java boolean. Created atomically with the student row in addStudent; all flags default to false.
| Campo | Tipo | Descripción |
|---|
id_payment | INT PK AUTO_INCREMENT | Identificador único del registro de pago |
register_payment | BOOLEAN | 1 si la inscripción ha sido pagada |
pay_1 … pay_7 | BOOLEAN | 1 si la mensualidad correspondiente (1–7) ha sido pagada |
payment_status | INT FK | Estado global del alumno — referencia a payment_status.id_status |
payment_status
Catalog table for overall payment status labels applied to students.
| Campo | Tipo | Descripción |
|---|
id_status | INT PK AUTO_INCREMENT | Identificador único del estatus |
description_status | VARCHAR | Descripción del estatus (p. ej. Al corriente, Adeudo, Beca) |
pay_simbology
Payment calendar — one row per billing event (inscription + up to 7 monthly fees). Rows are shared by all students; the period_pay field distinguishes between semesters. The updatePeriodo servlet flips all non-Cualquiera rows between Periodo A and Periodo B at semester change.
| Campo | Tipo | Descripción |
|---|
id_pay | INT PK AUTO_INCREMENT | Identificador único de la entrada del calendario |
month | VARCHAR | Nombre del mes |
description_pay | VARCHAR | Descripción del concepto de pago |
cost_pay | DOUBLE | Costo en pesos del concepto |
period_pay | VARCHAR | Semestre al que aplica: Periodo A, Periodo B, o Cualquiera |
deadline_pay | DATE nullable | Fecha límite de pago (NULL si no aplica) |