10月16日上午数据库作业设计表解析
时间:2021-07-01 10:21:17
帮助过:2人阅读
table class
(
code varchar(
20)
primary key,
name varchar(
20)
);
create table kecheng
(
code varchar(
20)
primary key,
name varchar(
20)
);
create table teacher
(
code varchar(
20)
primary key,
name varchar(
20)
);
create table tkecheng
(
ids int auto_increment
primary key,
tcode varchar(
20),
kcode varchar(
20),
foreign key (tcode)
references teacher(code),
foreign key (kcode)
references kecheng(code)
);
create table student
(
code varchar(
20)
primary key,
name varchar(
20),
sex bit,
age int,
class varchar(
20),
foreign key (class)
references class(code)
);
create table chengji
(
isd int auto_increment
primary key,
scode varchar(
20),
kcode varchar(
20),
degree float,
foreign key (scode)
references student(code),
foreign key (kcode)
references kecheng(code)
);
10月16日上午数据库作业设计表解析
标签: