用SQL的有关语句定义(1)图书Book,包括图书编号BookID,图书名称Title,图书作者Author,出版社Publi...

用SQL的有关语句定义(1)图书Book,包括图书编号BookID,图书名称Title,图书作者Author,出版社Publisher;(2)学生Student,包括学生编号ID,学生姓名Name,系Dept;(3)学生借书关系Lend,包括学生编号ID,图书编号BookID,借阅时间LDate。注意:说明主键码和外键码(如果有的话)。

create table book(BookID c(10) primary key ,Title c(20),Author c(10),Publisher c(30))
create table Student(ID c(10) primary key ,Name c(10,Dept c(30))
create table Lend(ID c(10),BookID c(10),LDate D, foreign key ID tag ID reference Student, foreign key BookID tag BookID reference book)
温馨提示:答案为网友推荐,仅供参考
相似回答