数据模型的三要素
1、概念数据模型(Conceptual Data Model)
2、逻辑数据模型(Logical Data Model)
3、物理数据模型(Physical Data Model)
自己找书展开
2.delete是删除记录 *** 作,如果数据有日志,在删除的同时会记录在日志中,drop table 是删除整个表机构,比如一个几百万行带日志库表,你用delete删除这个表可能要花几十分钟来写日志,如果你用drop talbe只是瞬间的事
3. on delete cascade
on delete no action
on delete set null
对应完整性应对方式,具体应用网络查看资料
基础的概念题,楼上各位很不专业啊
第一题:
(1):insert into Student(Sno, Sname,Sbirth, Sdept)values('15010203', '王强', ‘1990-11-21’, ‘信息’)
(2):delete from Student where Sno='15010102'
(3):update SC set Grade=60 where Sno='15010201'
(4):select t1.Sdept,t1.Sname,t3.Cname,t2.Grade from Student t1,SC t2,Course t3
where t1.Sno=t2.Sno and t2.Cno=t3.Cno
(5):select AVG(t1.Grade) as 英语平均成绩 from
SC t1,Course t2
where t1.Cno=t2.Cno
and t2.Cname='英语'
(6):select t1.Sno,t1.Sname,t1.Sdept from
Student t1,SC t2,Course t3
where t1.Sno=t2.Sno and t2.Cno=t3.Cno
and t3.Cname='英语'
第二题:计算关系那里没看见图,所以没法帮你作答。
(1):SELECT Sno AS 学号,Sname AS 姓名,Sex AS 性别
FROM Student
执行结果:
(2):SELECT Sno AS 学号,Sname AS 姓名,Sex AS 性别,class AS 班级
FROM Student
WHERE Sname LIKE '李%'
执行结果:
(3):SELECT t1.Sno AS 学号,t1.Sname AS 姓名,t1.class AS 班级
FROM Student t1,Course t2,Sc t3
WHERE t1.Sno=t3.Sno AND t2.Cno=t3.Cno
AND t2.Cname='数学'
执行结果:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)