erd 예제4

테이블 (6)

CUSTOMER

  • Key (customerID) — char(20) — 기본 키 — NOT NULL
  • Field (name) — char(20)
  • Field (address) — char(14)
  • Field (phone) — char(15)
  • Field (create_date) — date

Untitled (RENTAL)

  • Key (rental ID) — int — 기본 키 — NOT NULL
  • Field (rental_date) — time
  • Field (return_date) — time
  • Field (customerID) — int
  • Key (customerID2) — char(20) — 외래 키 → CUSTOMER.Key — NOT NULL

Untitled (FILM)

  • Key — 기본 키 — NOT NULL
  • Key (directorID) — CHAR(200) — 외래 키 → Untitled.Key — NOT NULL
  • Field (copyID) — char(100)
  • Field (date_of_purchase) — time
  • Field (rent_of_time) — time
  • Field (title) — int
  • Field (description) — text
  • Field (language) — int2
  • Field (length) — int2
  • Field (year_made) — time
  • Key (actorID) — char(700) — 외래 키 → Untitled.Key — NOT NULL
  • Key (rental ID) — int — 외래 키 → Untitled.Key — NOT NULL

Untitled (ACTOR)

  • Key (actorID) — char(700) — 기본 키 — NOT NULL
  • Field (biography) — text

Untitled (FILM_DIRECTOR)

  • Key (directorID) — CHAR(200) — 기본 키 — NOT NULL
  • Field (biography) — text

Untitled (PAYMENT)

  • Key (paymentID) — int4 — 기본 키 — NOT NULL
  • Field (customerID) — int2
  • Field (rentalID) — int
  • Field (amount) — numeric
  • Field
  • Key (rental ID) — int — 외래 키 → Untitled.Key — NOT NULL
  • Key (customerID2) — char(20) — 외래 키 → CUSTOMER.Key — NOT NULL