databasehomework2
第三章课后习题
如何下载课本的数据库?
这个是作者提供的网址啦~https://db-book.com/db6/lab-dir/sample_tables-dir/index.html
我使用的是mysql,所以首先使用
create database homework;
创建一个新的数据库然后下载https://db-book.com/db6/lab-dir/sample_tables-dir/DDL.sql
调用该sql文件,建表
source C:\Users\Administrator\Desktop\DDL.sql
然后下载https://db-book.com/db6/lab-dir/sample_tables-dir/smallRelations/smallRelationsInsertFile.sql
调用该sql文件,增添数据
source C:\Users\Administrator\Desktop\smallRelationsInsertFile.sql
3.11
1 |
|
3.12
1 |
|
3.13
1 |
|
3.14
1 |
|
3.15
1 |
|
3.19
答:<>all的对立面是=any,即只要与集合中的某一个元素相等即可。
而not in 的对立面是in,强调的也是只要与集合中的某一个元素相等就满足了。
所以<>all等价于not in.
3.23
答:因为takes用到了四个属性:course_id,sec_id,semester,year
。这四个属性都是外码,参照于section中的四个属性。又因为,这四个属性是section的主码,具有唯一性,所以如果不是需要section中的其他属性,连接section将没有影响。
databasehomework2
https://wuhlan3.gitee.io/2021/09/16/databasehomework2/