Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Create table KHOA(

MaKhoa char(10) not null,

TenKhoa char(30) not null,

SDTKHOA integer not null,

Primary Key (MaKhoa)).

Create table LOP(


MaLop char(10) not null,

TenLop char(30) not null,

SiSo integer,

MaKhoa char(10) not null,

Primary Key (MaLop),

Foreign Key (MaKhoa) reference KHOA).

Create table MON(


MaMon char(10) not null,

TenMon char(30) not null,

MaLop char(10) not null,

MaGV char(10) not null,

Primary Key (MaMon),

Foreign Key (MaLop) reference LOP,

Foreign Key (MaGV) reference GIANGVIEN).

Create table GIANGVIEN(


MaGV char(10) not null,

HoTen char(30) not null,

SDTGV integer not null,

MaKhoa char(10) not null,


Primary Key (MaGV),

Foreign Key (MaKhoa) reference KHOA).

Create table PHONG(


SoPhong char(10) not null,

ChucNang char(30),

Primary Key (SoPhong)).

Create table LICHBAOGIANG(


MaLop char(10) not null,

MaMon char(10) not null,

SoPhong char(10) not null,

TuTiet integer not null,

DenTiet integer not null,

Lythuyet char(10),

BaiDay char(30),

GhiChu char(30),

Primary Key (MaLop,MaMon,SoPhong,TuTiet,DenTiet),

Foreign Key (MaLop) reference LOP,

Foreign Key (MaMon) reference MON,

Foreign Key (SoPhong) reference PHONG).

You might also like