课程目标 |
对应指标点 |
要求说明 |
对应模块 |
考试分值 |
CO1 |
基本知识与原理方法 |
CM1-CM7 |
40 |
|
CO2 |
GR3.4 |
数据库设计建模能力 |
CM4 |
15 |
CO3 |
GR4.2 |
数据库SQL编程与数据库管理能力 |
CM3,CM5 |
15 |
CO4 |
GR5.3 |
数据库应用编程与复杂工程问题 |
CM3,CM6 |
30 |
选择题: 全部七章占比相同
判断题: 全部七章占比相同
应用题:3、4、5、6章各一提(类似简答,比简答偏应用)
编程题:第三章 20分 5、6章各一题5分
设计题: 第四章 10分(E_R图)
第三章:难度和实验测评类似。
第四章:实体数量不超过6个的CDM图。
第五章:课件中的图表,给出部分,完成剩余部分;代码:加锁协议;
第六章:课件中的图表,给出部分,完成剩余部分;代码:JDBC、存储过程、触发器、游标;
以课件为主,第五、六章代码题的形式包括:自主完成;给出部分代码,完成剩余部分;书写代码注释;
第七章只有选择和对错,复习概念性的内容
4行,求同存异
2行,求同
R去同留异
6列9行
选择sigma 投影π,sigma dept='IS'(Student)
sigma age<20(Student)
πSname,depc(Student)
πdepc(Student)
错了:我写错成自然连接了,现在是条件连接
creat database CourseDB;
错: alter CourseDB rename to CourseManageDB;
应该为:
alter database CourseDB rename to CourseManageDB;
drop database CourseMangerDB;
creat table Student(
StudentID char(13) not null primary key,
StudentName varchar(10) not null,
... char(2),
...data,
...varchar(30),
...char(11)
);
creat table Course(
... char(4) not null primary key,
...vc(20) not unique,
...vc ...check in('...','...'), 错误,改为check(...in ('..','..','..'))
... smallint
vc... default '....'
);
...
...
...
...
constraint ..._PK primary key(...,..) 没记住
);
。。。
... series not null, 错了:改为serial
...
constraint .._PK primary key (...); 漏了
);
...
... serial ...,
... bigint not..,
contraint ... pri.. c..,
contraint ... foreign key (C..) reference from table ...; 错了:改为references Plan(CourseID) on delect cascade;
alter table Student add email varchar(255);
drop table Register; 没有alter
creat index B_idx on Student(Birthday); 漏了
alter index b.. rename to b...;
drop index b。。;
insert into table Student values('....',); 错误:多余 ,改为:insert into Student values('....',);
insert into Student(email) '...' where Sname='...';
改为
updata Student
set Email=‘。。。’
where StudentName='..';
drop Student where SN='';
改为
delete
from student
where SN='';
select ...,..,... from Student;
..*...
select distinct * from...
select * ... where S..gender='..';
select ...,...,... ....
select * ...where bir.. between '...' and '...';
select .... where ... like '%@163.com';
select ..where ..and ...;
...where ...in('...');
...order by ... desc 忘记了
..order by ... DESC,order by ...ASC; 多了,改为 ..order by ... DESC, ...ASC;
select count(*) as 学生人数 from student; 漏了
select max(age),min(age) as .. ,.. from ...;
顺序不对,改为 max(bir.. ) as...,min(b...) as ...
select * f.. s.. group by major;
改为
select major as 专业 ,count(StudentID)as学生人数 f.. s.. group by major;
select major as ..,count(SI) as ... from student group by major having count(SI)>2; 漏,错
select major as ..,count(SI) as ... from student where SG='男' group by major having count(*)>2;
select ...from teacher where CI in (select CI from C where CN='...');
select ... from t,c where t.ci=c.ci and CN='..'
grant insert,alter,delect,select table register to RoleS; 错了:数据修改用update,表用on
改为
grant insert,update,delect,select on register to RoleS;
revoke delect on register from Roles;
deny delect on teacher to RoleT; 忘了
create view Basic... from ..;
改为
creat view B... as select ...from...where ...='';
select * from view B.. order by CN; 多了:改为 select * from B.. order by CN;
drop view B...;
主键和属性分别为表
找到两个主键缺一不可,能推出的属性为一张表,然后主键各自领养属性
begin transaction
SQL
。。。
commit
end transaction
begin transaction
SQL
。。。
rollback
end transaction
cd \program files\PostgreSQL\12\bin
pg_dump -h localhost -U postgres -p 5432 -d coursedb -c -C
-f f:\databackup\coursedb.backup
psql -h 127.0.0.1 -U postgres -p 5432 -f f:\databackuplcoursedb.backup
pg_dumpall -h localhost -U postgres -p 5432 -c -C -f f:\databackup\coursedb.backup 没有-d
creat user "userA" with
login
nosuperuser
nocreatedb
nocreaterole
inherit
noreplication
connection limit -1
password '123456';
alter user "userA"
conncection limit 10 没有逗号
password 'gres123';
drop user "userA";
create or replace function ...()
returns integer AS $$
declare
count int;
begin
select...;
end;
$$ language plpgsql;
select countRecords();
select into res countRecords();
drop function if exists testExec();
NoSQL理论基础:
CAP理论:一致性、可用性、分区容忍性。
BASE模型:基本可用、软状态、最终一致性。
最终一致性理论:因果一致性、读一致性、会话一致性、单调读一致性、单调写一致性。
NoSQL数据库分类:
键值对存储方式:Redis
列存储方式:HBase
文档存储方式:MongoDB
图形存储方式:Neo4j