graph{
  start=42

  // Entities
  node [
    shape=box
    style=filled
    penwidth=1.5
    fillcolor="#FFFFFF"
  ]
  1 [label="Œuvre"]
  5 [label="Exemplaire",peripheries=2]

  // Normal entity attributes
  node [
    shape=oval
    penwidth=1.5
    fillcolor="#FFFFFF"
  ]
  3 [label="auteur"]
  8 [label="nb\npages"]
  9 [label="date\nachat"]

  // Weak and strong entity attributes
  2 [label=<<u>œuvre</u>>]
  7 [label=<<u>exemplaire</u>> style="dashed,filled"]

  // Relationship attributes
  node [
    fillcolor="#FFFFFF"
  ]
  6 [label="foobar"]

  // Relationships
  node [
    shape=diamond
    height=0.7
    penwidth=1.5
    fillcolor="#FFFFFF"
  ]
  4 [label="DF",peripheries=2]

  // Edges between entities and attributes
  edge [
    penwidth=1.5
  ]
  1 -- 2
  1 -- 3
  5 -- 7
  5 -- 8
  5 -- 9

  // Edges between relationships and attributes
  edge [color="#000000"]
  4 -- 6

  // Edges between entities and relationships
  edge [
    penwidth=1
    color="#000000:#000000"
    labeldistance=2
    headlabel=1
  ]
  1 -- 4 [color="#000000"]
  edge [headlabel=N]
  5 -- 4
}