예제4(DVD)

테이블 (7)

Untitled (MOVIE)

  • Key (movieID) — int(10) — 기본 키 — NOT NULL
  • Field (title) — char(30)
  • Field (pubYear) — int(4)
  • Field (pubMonth) — int(2)
  • Field (description) — text
  • Field (award) — text

Untitled (DVDITEM)

  • Key (itemID) — int(100) — 기본 키 — NOT NULL
  • Field (buyingDate) — date
  • Field (price) — int(10)
  • Field (statusLevel) — char(1)
  • Field (movieID) — int(10)
  • Key (movieID2) — int(10) — 외래 키 → Untitled.Key — NOT NULL

Untitled (RENT)

  • Key (rentID) — int(100) — 기본 키 — NOT NULL
  • Field (rentDate) — date
  • Field (returnDate) — date
  • Field (itemID) — int(100)
  • Key (itemID2) — int(100) — 외래 키 → Untitled.Key — NOT NULL
  • Key (customerID) — int(100) — 외래 키 → Untitled.Key — NOT NULL

Untitled (CASTING)

  • Key (movieID) — int(10) — 기본 키 — NOT NULL
  • Key (personID2) — int(10) — 외래 키 → Untitled.Key — NOT NULL
  • Key (roleID2) — int(3) — 외래 키 → Untitled.Key — NOT NULL
  • Key (movieID2) — int(10) — 외래 키 → Untitled.Key — NOT NULL
  • Field (personID) — int(10)
  • Field (roleID) — int(3)
  • Field (description) — text

Untitled (PERSON)

  • Key (personID) — int(10) — 기본 키 — NOT NULL
  • Field (fname) — char(30)
  • Field (minit) — char(1)
  • Field (lname) — char(30)
  • Field (award) — text
  • Field (description) — text

Untitled (ROLE)

  • Key (roleID) — int(3) — 기본 키 — NOT NULL
  • Field (roleTitle) — char(30)
  • Field (description) — text

Untitled (CUSTOMER)

  • Key (customerID) — int(100) — 기본 키 — NOT NULL
  • Field (name) — char(30)
  • Field (adress) — char(40)
  • Field (phone) — int(11)