assignment2

Tables (9)

Comment_to (comment_to)

  • ct_id — int — Primary key — NOT NULL
  • m_id — int — Foreign key → Movie.m_id — NOT NULL
  • c_id — int — Foreign key → Customer.c_id — NOT NULL
  • rating — int
  • comment — string
  • write_date — date

Customer (customer)

  • c_id — int — Primary key — NOT NULL
  • c_name — string
  • email — string
  • pwd — string
  • gender — int
  • phone — string

Genre

  • g_id — int — Primary key — NOT NULL
  • g_name — string

Movie

  • m_id — int — Primary key — NOT NULL
  • m_type — string
  • m_name — string
  • start_year — int
  • end_year — int
  • runtimes — time
  • is_adult — bool
  • m_rating — double
  • votes — int

Participant

  • p_id — int — Primary key — NOT NULL
  • p_name — string
  • major_work — int
  • pr_id — int — Foreign key → Profession.pr_id — NOT NULL

Participate

  • participate_id — int — Primary key — NOT NULL
  • role — string
  • casting — string
  • p_id — int — Foreign key → Participant.p_id — NOT NULL
  • m_id — int — Foreign key → Movie.m_id — NOT NULL

Prefer

  • l_id — int — Primary key — NOT NULL
  • g_id — int — Foreign key → Genre.g_id — NOT NULL
  • c_id — int — Foreign key → Customer.c_id — NOT NULL

Profession

  • pr_id — int — Primary key — NOT NULL
  • pr_name — string

Watch

  • w_id — int — Primary key — NOT NULL
  • c_id — int — Foreign key → Customer.c_id — NOT NULL
  • m_id — int — Foreign key → Movie.m_id — NOT NULL
  • watch_date — date
  • pause_time — time