大概思路是,先建立一个book 表,再建一个borrow表,borrow表参照book表,
即borrow建立book表的外键,即可一对多关联
具体实现如下:
1、建立一个book表
carete table book
(book_id number primary key,
book_name varchar(100)
);
2、建立一个borrow表
create table borrow
(borrow_id number primary key ,
book_id number references book(book_id),
borrow_userid varchar(100),
borrow_time date
);