SQL数据库管理与设计课程设计题目为:校园图书管理系统 图书馆在正常运营中面对大量书籍、读者信息以及两者

球球 写了一半 --图书表
create table tushu
(shuno char(5),
duno char(5),
zuozhe char(10),
shuname char(10),
shutime int)
--读者表
create table duzhe
(dname char(10),
xibie char(20),
xingbie char(2),
nianling int,
jieshubianhao char(5))
--还书表
create table huanshu
(huanshubianhao char(5),
huanno char(5),
time1 datetime)
--借书表
create table jieshu
(jieshubianhao char(10),
jieno char(5),
time2 datetime)
1视图:

create view vq
as
select tushu.shuname,jieshu.jieno
from tushu,jieshu
where shuno=jieshubianhao

2、视图:

create view vw
as
select dname,jieshubianhao
from duzhe

3、视图:

create view ve
as
select shuno,dname
from tushu,duzhe
where shuno=jieshubianhao

一个默认对象
create default dq as '计算机系'
go
exec sp_bindefault dq,'duzhe.xibie'
go
二个默认对象
create default dw as '男'
go
exec sp_bindefault dw,'duzhe.xingbie'
go
第一个规则
create rule ra as @s in ('男','女')
go
exec sp_bindrule ra,'duzhe.xingbie'
go
第二个规则
create rule rz as
@x>=20 and @x<=30
go
exec sp_bindrule rz,'duzhe.nianling'
go
存储:

create procedure pz
as
select *
from jieshu
where jieno='00001'
go

存储:

create procedure pp
@shuno char(10)=01
as
select *
from tushu
where shuno=@shuno
go

触发器:

create trigger Set1 on huanshu
for insert,update,delete
as
update huanshu set huanshubianhao=(
select shuno
from tushu
where shuno=huanshubianhao)
go
触发器:

create trigger Set2 on tushu
for update
as
print '记录已修改'
go

第一个索引
create unique nonclustered index in_1 on tushu(shuno)
go
索引
create index in_2 on huanshu(huanshubianhao,huanno)
go

就不会了 求大家 帮帮忙 加点数据

可以应用百度Hi通知我们
有机会可以解决你的问题
具体的要求也可以通知我们

ES:\\619BC199F59D92FF32EF0CD1B7136F6F
温馨提示:答案为网友推荐,仅供参考