2024_04_ERD Exercise 4

Tables (9)

Untitled (CLIENT)

  • Key (clientId) — char(100) — Primary key — NOT NULL
  • Field (cusName) — char(20)
  • Field (phone) — int(11)

Untitled (DVDITEM)

  • Key (itemId) — int(100) — Primary key — NOT NULL
  • Field (buyingdate) — date
  • Field (price) — int(10)
  • Field (statusLevel) — char(1)
  • Field (time of Purchase) — time
  • Key (movieId) — int(10) — Foreign key → Untitled.Key — NOT NULL

Untitled (MOVIE)

  • Key (movieId) — int(10) — Primary key — NOT NULL
  • Field (title) — char(30)
  • Field (pubYear) — int(4)
  • Field (pubMonth) — int(2)
  • Field (description) — LONGTEXT
  • Field (award) — LONGTEXT

Untitled (MOVIE_GENRE)

  • Key (movieId) — int(10) — Foreign key → Untitled.Key — NOT NULL
  • Key (genreld) — int(3) — Foreign key → Untitled.Key — NOT NULL

Untitled (PERSON)

  • Key (personId) — int(10) — Primary key — NOT NULL
  • Field (fname) — char(30)
  • Field (minit) — char(1)
  • Field (Iname) — char930)
  • Field (description) — LONGTEXT
  • Field (award) — LONGTEXT

Untitled (ROLE)

  • Key (roleId) — int(5) — Primary key — NOT NULL
  • Field (roleTitle) — char(30)
  • Field (description) — LONGTEXT

Untitled (GENRE)

  • Key (genreld) — int(3) — Primary key — NOT NULL
  • Field (name) — char(30)
  • Field (description) — LONGTEXT
  • Field

Untitled (CASTING)

  • Key (movieId) — int(10) — Foreign key → Untitled.Key — NOT NULL
  • Key (personId) — int(10) — Foreign key → Untitled.Key — NOT NULL
  • Key (roleId) — int(5) — Foreign key → Untitled.Key — NOT NULL

Untitled2 (RENT)

  • Key (rentId) — int(1000) — Primary key — NOT NULL
  • Field (rentDate) — date
  • Field (returnDate) — date
  • Key (itemId) — int(100) — Foreign key → Untitled.Key — NOT NULL
  • Key (clientId) — char(100) — Foreign key → Untitled.Key — NOT NULL