Diagrama de Relación de Entidades

Basado en la notación de Ingeniería de la Información.

Esta es una extensión del Diagrama de Clases existente. Esta extensión añade:

  • Relaciones adicionales para la notación de Ingeniería de la Información.
  • Un alias entity que mapea al diagrama de clase class.
  • Un modificador de visibilidad adicional * para identificar atributos obligatorios.

Por lo demás, la sintaxis para dibujar diagramas es la misma que para los diagramas de clase. Todas las demás características de los diagramas de clase también son compatibles

Information Engineering Relations

Type Symbol
Zero or One |o--
Exactly One ||--
Zero or Many }o--
One or Many }|--

Examples:

🎉 Copied!

@startuml
Entity01 }|..|| Entity02
Entity03 }o..o| Entity04
Entity05 ||--o{ Entity06
Entity07 |o--|| Entity08
@enduml

Entities

🎉 Copied!

@startuml
entity Entity01 {
  * identifying_attribute
  --
  * mandatory_attribute
  optional_attribute
}
@enduml

Again, this is the normal class diagram syntax (aside from use of entity instead of class). Anything that you can do in a class diagram can be done here.

The * visibility modifier can be used to identify mandatory attributes. A space can be used after the modifier character to avoid conflicts with the creole bold:

🎉 Copied!

@startuml
entity Entity01 {
   optional attribute
   **optional bold attribute**
   * **mandatory bold attribute**
}
@enduml

Ejemplo completo

🎉 Copied!

@startuml

' hide the spot
hide circle

' avoid problems with angled crows feet
skinparam linetype ortho

entity "Entity01" as e01 {
  *e1_id : number <<generated>>
  --
  *name : text
  description : text
}

entity "Entity02" as e02 {
  *e2_id : number <<generated>>
  --
  *e1_id : number <<FK>>
  other_details : text
}

entity "Entity03" as e03 {
  *e3_id : number <<generated>>
  --
  e1_id : number <<FK>>
  other_details : text
}

e01 ||..o{ e02
e01 |o..o{ e03

@enduml

Actualmente las patas de gallo no se ven muy bien cuando la relación se dibuja en ángulo con la entidad. Esto puede evitarse utilizando el parámetro de piel linetype ortho

WARNING
 This translation need to be updated. 
WARNING


Privacy Policy      Advertise