@startuml entity-relationship !theme plain skinparam linetype ortho skinparam classBackgroundColor #F8F9FA skinparam classBorderColor #495057 title Sistema de Registro de Estudiantes - Diagrama Entidad-Relación entity "Students" as students { * **Id** : int <> -- * Name : nvarchar(100) * Email : nvarchar(255) <> * CreatedAt : datetime2 UpdatedAt : datetime2 } entity "Professors" as professors { * **Id** : int <> -- * Name : nvarchar(100) } entity "Subjects" as subjects { * **Id** : int <> -- * Name : nvarchar(100) * Credits : int {= 3} * **ProfessorId** : int <> } entity "Enrollments" as enrollments { * **Id** : int <> -- * **StudentId** : int <> * **SubjectId** : int <> * EnrolledAt : datetime2 -- <> (StudentId, SubjectId) } ' Relaciones students ||--o{ enrollments : "tiene" subjects ||--o{ enrollments : "inscripciones" professors ||--|| subjects : "imparte 2" note right of students Restricciones: - Email único - Máximo 3 enrollments end note note right of subjects Datos iniciales: 10 materias 3 créditos cada una end note note right of professors Datos iniciales: 5 profesores 2 materias cada uno end note note bottom of enrollments Reglas de negocio: - (StudentId, SubjectId) único - Estudiante no puede tener 2 materias del mismo profesor end note @enduml