1.新建主键table create table demo1_zhujian ( id int primary key auto_increment, name )); 2.新建外键table create table demo2_waijian ( id int primary key auto_increment, _id , name ), index (_id), FOREIGN KEY (_id) REFERENCES demo1_zhujian(id) ON DELETE CASCA…
Messages表: mysql>create table Messages( ->message_id int auto_increment primary key, ->user_name varchar(50) not null, ->author_id int not null, ->body text, ->forum_id int not null); Forums表: mysql>create table Forums( ->forum_id…