关于course_content_file表的创建
来源:8-8 作业讲解:课程内容中增加文件管理
慕神4535282
2020-08-10
受 “ 课程分类” 表的启发,
drop table if exists course_category;
create table course_category (id char(8) not null default ‘’ comment ‘id’,course_id char(8) comment ‘课程|course.id’,category_id char(8) comment ‘分类|course.id’,
primary key (id)
) engine=innodb default charset=utf8mb4 comment=‘课程分类’;
我个人觉得 course_content_file表
drop table if exists course_content_file;
create table course_content_file (id char(8) not null default ‘’ comment ‘id’,course_id char(8) not null comment ‘课程id’,url varchar(100) comment ‘地址’,name varchar(100) comment ‘文件名’,size int comment ‘大小|字节b’,
primary key (id)
) engine=innodb default charset=utf8mb4 comment=‘课程内容文件’;
改成course_file表更好一点,
drop table if exists course_file;
create table course_file (id char(8) not null default ‘’ comment ‘id’,course_id char(8) comment ‘课程id|course.id’,file_id char(8) comment ‘文件id|file.id’,
primary key (id)
) engine=innodb default charset=utf8mb4 comment=‘课程文件’;
想听听老师的想法?
1回答
-
甲蛙
2020-08-10
course_content_file,表示的是这个文件表只给课程内容用,如果文件表是给课程用,那么可以叫course_file
00
相似问题