“Débil” + “Identificadora” (flowchart estilizado)
flowchart LR
classDef weak stroke-width:3px,stroke-dasharray: 6 3,rx:6,ry:6
classDef strong stroke-width:2px
CLIENTE([CLIENTE]):::strong -->|IDENTIFICA| PAGO([PAGO débil]):::weak
PAGO ---|"clave parcial: Nº_Pago"| PAGO
Chen diagrams
flowchart LR
%% estilos opcionales
classDef entity stroke-width:2px,rx:6,ry:6
classDef attr color:#f8f8f8,stroke:#888,rx:20,ry:20
classDef weak stroke-dasharray:6 3
%% entidades
PERSON[PERSON]:::entity
HOUSE[HOUSE]:::entity
%% relación (rombo)
HABITA{HABITA}
%% atributos ejemplo
DNI((DNI)):::attr
nombre((nombre)):::attr
id_house((id_house)):::attr
direccion((direccion)):::attr
%% enganchar atributos a entidades
DNI --- PERSON
nombre --- PERSON
id_house --- HOUSE
direccion --- HOUSE
%% cardinalidades como etiquetas en las aristas
PERSON -- "(1,N)" --> HABITA
HABITA -- "(0,1)" --> HOUSE
%% (opcional) entidad débil: aplica clase 'weak' a la caja
%% ORDER[ORDER]:::weak
flowchart LR
%% ==== estilos ====
classDef entity stroke-width:2px,rx:8,ry:8
classDef weak stroke-width:3px,stroke-dasharray:6 3,rx:8,ry:8
classDef rel shape:diamond,stroke-width:2px,rx:4,ry:4
classDef ident shape:diamond,stroke-width:4px,rx:4,ry:4
%% ==== nodos ====
E[Entidad]:::entity
W[Entidad Débil]:::weak
R{Relación}:::rel
I{Vínculo identificador}:::ident
%% ==== ejemplo de enlaces con cardinalidad (min–max) ====
E -- "(1,N)" --- R
R -- "(0,1)" --- W
%% leyenda visual (opcional)
%% - Entidad débil: borde discontinuo/grueso
%% - Vínculo identificador: rombo “más grueso”
flowchart TB
%% ==== estilos ====
classDef entity stroke-width:2px,rx:8,ry:8
classDef weak stroke-width:3px,stroke-dasharray:6 3,rx:8,ry:8
classDef rel shape:diamond,stroke-width:2px,rx:4,ry:4
classDef ident shape:diamond,stroke-width:4px,rx:4,ry:4
classDef attr fill:#f8f8f8,stroke:#888,rx:20,ry:20
%% ==== entidades ====
CLIENTE[CLIENTE]:::entity
PAGO[PAGO]:::weak
%% ==== relación identificadora ====
IDENTIFICA{IDENTIFICA}:::ident
%% ==== atributos (círculos como ovals) ====
DNI((DNI)):::attr
Nombre((nombre)):::attr
NumPago((Nº_Pago)):::attr
Importe((importe)):::attr
Fecha((fecha)):::attr
%% enganchar atributos a entidades
CLIENTE --- DNI
CLIENTE --- Nombre
PAGO --- NumPago
PAGO --- Importe
PAGO --- Fecha
%% cardinalidades (min–max)
CLIENTE -- "(1,N)" --> IDENTIFICA
IDENTIFICA -- "(1,1)" --> PAGO
%% notas:
%% - PAGO es entidad débil (depende de CLIENTE + clave parcial Nº_Pago).
%% - IDENTIFICA es vínculo identificador (participación total de PAGO).
flowchart TB
%% ===== Styles (GitHub-safe) =====
classDef entity stroke-width:2px,rx:8,ry:8
classDef weak stroke-width:3px,stroke-dasharray:6 3,rx:8,ry:8
classDef attr fill:#fff,stroke:#555,rx:20,ry:20
classDef key stroke-width:3px,rx:20,ry:20
%% Mermaid can't draw a real "double oval"; we simulate multivalued with thicker border + label
classDef mult stroke-width:4px,rx:22,ry:22
classDef deriv stroke-dasharray:6 3,rx:20,ry:20
classDef partial stroke-width:3px,stroke-dasharray:6 2,rx:20,ry:20
classDef note fill:#f8f8f8,stroke:#ccc,rx:6,ry:6,color:#333,font-size:12px
%% ===== Example entity (normal) =====
ENTIDAD[ENTIDAD]:::entity
%% ===== Attribute types =====
A1((Atributo)):::attr
A2((Atributo Clave)):::key
A3((Email)):::mult
A4((Nombre)):::attr
A4a((Nombre_de_pila)):::attr
A4b((Apellido)):::attr
A5((Nº_Pago)):::partial
A6((Edad)):::deriv
%% ===== Weak entity to host partial key =====
PEDIDO[ENTIDAD DÉBIL]:::weak
%% ===== Hooks =====
ENTIDAD --- A1
ENTIDAD --- A2
ENTIDAD --- A3
ENTIDAD --- A4
A4 --- A4a
A4 --- A4b
PEDIDO --- A5
ENTIDAD --- A6