text: DROP TABLE IF EXISTS KETQUA
  DROP TABLE IF EXISTS DMSV
  DROP TABLE IF EXISTS DMMH
  DROP TABLE IF EXISTS DMKHOA
  
  CREATE TABLE DMKHOA
  (
      MaKH  CHAR(2) PRIMARY KEY,
      TenKH NVARCHAR(50),
  )
  
  CREATE TABLE DMMH
  (
      MaMH  CHAR(2) PRIMARY KEY,
      TenMH NVARCHAR(50),
      HeSo  INT NOT NULL,
  )
  
  CREATE TABLE DMSV
  (
      MaSV    CHAR(3) PRIMARY KEY,
      TenSV   NVARCHAR(50),
      MaKH    CHAR(2) NOT NULL,
      Nam     BIT,
      SoMonDK INT,
      DiemTB  INT,
      FOREIGN KEY (MaKH) REFERENCES DMKHOA (MaKH) ON UPDATE CASCADE ON DELETE CASCADE,
      CHECK (DiemTB >= 0 AND DiemTB <= 10)
  )
  
  CREATE TABLE KETQUA
  (
      MaSV CHAR(3) NOT NULL,
      MaMH CHAR(2) NOT NULL,
      Diem FLOAT,
      PRIMARY KEY (MaMH, MaSV),
      FOREIGN KEY (MaMH) REFERENCES DMMH (MaMH) ON UPDATE CASCADE ON DELETE CASCADE,
      FOREIGN KEY (MaSV) REFERENCES DMSV (MaSV) ON UPDATE CASCADE ON DELETE CASCADE,
  )