一、 创建数据库及三张表 在 MYSQL 或 SQL Server 中创建名为 SRB 的数据库,然后在此数据库中用 SQL 命令创建如下三个表: Sailors(sid char(10),sname char(20),rating int,age int), 其中 sid 是主关键字, sid 表示水手的编号, sname 表示水手的姓名, rating 表示水手的级别, age 表示水手的年龄。 Boats(bid char(10),bname char(20),color char(10)), 其中 bid 表示船的编号是主关键字, bname 是船的名字且不允许为空, color 是船的颜色。 Reserves(sid char(10),bid char(10),rdate date), Reserves 中记录水手在哪天定了哪只船,其中 sid 是指向 Sailors 的外关键字, bid 是指向 Boats 的外关键字 ,(sid,bid,rdate) 合起来构成 Reserves 的主关键字。当 sailors 或 Boats 中的相关记录被删除时要求 Reservers 中的记录也被联带删除。 二、用 SQL 命令修改表的结构 ( 1 )在 Sailors 表中添加 Gender 字段,类型为 char(1), 默认值为‘ F ’。 ( 2 )修改 Sailors 表中 Gender 字段类型为 char(2), 改默认值为 ' 男 ' 。 ( 3 )修改 Sailors 表中 Gender 字段名称,改为 Sex 。 ( 4 )删除 Sailors 表的 Sex 字段。 ( 5 )为 Boats 表的 Bname 字段创建降序普通索引。 ( 6 )为 Sailors 的 Sname 字段创建唯一索引。 (7) 删除S ailors 的 Sname 字段的唯一索引 三、请将下面的数据插入到表中 sailors 表 "22"," 你的真实姓名 ",7,45 "29"," 你某个室友的姓名 ",1,33 "31","lubber",8,56 "32","andy",8,26 "58","rusty",10,35 "64","horatio",7,35 "71","zorba",10,35 "74","horatio",9,35 "85","art",3,26 "86","john",1,17 "95","bob",3,64 "96","frodo",3,26 "98","tom",3,17 Boats 表 "101","A","red" "102","B","green" "103","C","blue" "104","D","white" "105","E","red" "106","F","blue" "107","G","green" Reserves 表 "22","101","2010-01-08" "22","102","2010-01-09" "29","103","2010-01-09" "31","102","2010-02-11" "22","104","2010-03-08" "22","103","2010-03-10" "32","105","2010-03-11" "32","106","2010-03-18" "32","102","2010-03-19" "58","104","2010-03-20" "64","105","2010-03-20" "95","101","2010-04-02" "85","102","2010-04-05" "22","101","2010-04-07" "22","105","2010-05-01" "22","106","2010-06-18" "22","107","2010-07-09" "31","106","2010-08-06" "32","105","2010-08-06" "29","104","2010-08-07" "64","103","2010-09-05" "58","102","2010-09-09" "64","104","2010-11-03" "64","105","2010-11-04" "31","106","2010-12-06" 四、完成下面的 SQL 查询(须提交SQL命令并截图命令的执行结果) 1. 查找定了 103 号船的水手 2. 查找定了红色船水手的姓名 3. 将年龄小于 30 的水手级别 +1 4. 查找定了红色船而没有定绿色船的水手姓名 提交要求: 作业以 word 文档附件的形式提交, 要求列出SQL 语句,并附上适当截图佐证命令成功执行。如有雷同,0分处理!