ERD Exercise 2

Tables (6)

Untitled (AEROBICS)

  • Key (AID) — char(20) — Primary key — NOT NULL
  • Field (description) — text
  • Field (price) — int(10)

Untitled (YOGA)

  • Key (YID) — char(20) — Primary key — NOT NULL
  • Field (description) — text
  • Field (price) — int(10)

Untitled (SWIMMING)

  • Key (SID) — char(20) — Primary key — NOT NULL
  • Field (description) — text
  • Field (price) — int(10)

Untitled (SPORTS CLASS)

  • Key (ClassID) — char(20) — Primary key — NOT NULL
  • Field (limitation) — int(3)
  • Field (current register) — int(3)
  • Key (AID) — char(20) — Foreign key → Untitled.Key — NOT NULL
  • Key (YID) — char(20) — Foreign key → Untitled.Key — NOT NULL
  • Key (SID) — char(20) — Foreign key → Untitled.Key — NOT NULL

Untitled (MEMBER)

  • Key (MID) — char(20) — Primary key — NOT NULL
  • Field (name) — char(20)
  • Field (address) — char(50)
  • Field (age) — int(3)
  • Field (preference) — text

Untitled (CLASS_MEMBER)

  • Key (ClassID) — char(20) — Foreign key → Untitled.Key — NOT NULL
  • Key (MID) — char(20) — Foreign key → Untitled.Key — NOT NULL
  • Field (level) — int(2)