Middle School

Tables (7)

Untitled (Subject)

  • Key (sub_code) — bigint — Primary key — NOT NULL
  • Field (sub_name) — varchar(10) — NOT NULL

Untitled (Student)

  • Key (stu_code) — bigint — Primary key — NOT NULL
  • Field (stu_name) — varchar(10) — NOT NULL
  • Field (stu_gender) — varchar(5) — NOT NULL
  • Field (stu_number) — int — NOT NULL
  • Key (class_code) — bigint — Foreign key → Untitled.Key — NOT NULL

Untitled (Class)

  • Key (class_code) — bigint — Primary key — NOT NULL
  • Field (class_name) — varchar(10) — NOT NULL
  • Field (class_people) — int — NOT NULL
  • Key (grade_code) — bigint — Foreign key → Untitled.Key — NOT NULL

Untitled (Grade)

  • Key (grade_code) — bigint — Primary key — NOT NULL
  • Field (grade_name) — varchar(10) — NOT NULL

Untitled (Teacher)

  • Key (teacher_code) — bigint — Primary key — NOT NULL
  • Key (sub_code) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Field (teacher_name) — varchar(10) — NOT NULL
  • Key (class_code) — bigint — Foreign key → Untitled.Key

Untitled (Test)

  • Key (test_code) — bigint — Primary key — NOT NULL
  • Key (sub_code) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Field (test_name) — varchar(10) — NOT NULL

Untitled (score)

  • Key (score_code) — bigint — Primary key — NOT NULL
  • Key (test_code) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Key (sub_code) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Field (score) — int — NOT NULL
  • Field (ranking) — varchar(5) — NOT NULL
  • Key (stu_code) — bigint — Foreign key → Untitled.Key — NOT NULL