The backend uses a PostgreSQL 15 database namedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanSebax85/backend-prueba-fullstack/llms.txt
Use this file to discover all available pages before exploring further.
prueba. Hibernate manages the schema automatically on startup, creating or updating the three core tables — alumnos, materias, and notas — to match the entity definitions in the application.
Schema overview
alumnos
Stores student records.| Column | Type | Notes |
|---|---|---|
id | bigint | Primary key, auto-generated |
nombre | varchar | First name |
apellido | varchar | Last name |
email | varchar | Email address |
fecha_nacimiento | date | Date of birth |
materias
Stores course (subject) records.| Column | Type | Notes |
|---|---|---|
id | bigint | Primary key, auto-generated |
nombre | varchar | Course name |
codigo | varchar | Course code |
creditos | integer | Credit value |
notas
Stores grade records. Each nota links one alumno to one materia.| Column | Type | Notes |
|---|---|---|
id | bigint | Primary key, auto-generated |
valor | double precision | Grade value |
fecha_registro | date | Date the grade was recorded |
alumno_id | bigint | Foreign key → alumnos.id |
materia_id | bigint | Foreign key → materias.id |
Referential integrity
Thenotas table has foreign key constraints on both alumno_id and materia_id. This enforces referential integrity at the database level:
- A nota cannot reference an alumno or materia that does not exist.
- Attempting to delete an alumno or materia that still has associated notas will fail with a foreign key violation.
- Delete notas that reference the target alumno or materia.
- Delete the alumno or materia.
Connecting to the database
To open an interactive PostgreSQL session inside the running container:psql shell connected to the prueba database as the postgres user.
Viewing existing data
Once connected, run standard SQL queries to inspect the data:Restoring a backup dump
Copy the dump file into the container
postgres_db container at /backup.dump.If the dump contains
CREATE TABLE statements and the tables already exist, you may see errors for duplicate objects. To restore cleanly, either drop the existing tables first or use a dump format that includes DROP TABLE IF EXISTS statements.Schema auto-management
The application is configured with:application.properties
Next steps
Configuration guide
Set the database connection variables and understand connection pool settings.
Docker deployment
Start the database service and run the full stack with Docker Compose.