BT View
BT View
on (name = 'qldiem',
filename= 'd:\HQT\qldiem1.mdf',
size = 5MB, maxsize= 10 MB, filegrowth =10%
)
log on (name ='qldiem_log',
filename='d:\HQT\qldiem1.ldf',
size = 1MB, maxsize = 5MB, filegrowth = 10%
)
use QuanLyDiem
go
create table KHOA
(
MaKhoa varchar(5) not null primary key,
TenKhoa varchar(50),
SoCBGD smallint
)
create table SINHVIEN
(
MaSV varchar(5) not null primary key,
TenSV varchar(50) not null,
NgaySinh smalldatetime,
GioiTinh bit not null,
DiaChi varchar(50),
Tinh varchar(50),
MaKhoa varchar(5) not null,
HocBong int,
constraint f_SV_KH foreign key(MaKhoa) references KHOA(makhoa)
)
---tạo bảng MONHOC
create table MONHOC
(
MaMH varchar(5) not null primary key,
TENMH varchar(50),
SoTietLT smallint,
SoTietTH smallint
)