ImageVerifierCode 换一换
格式:DOCX , 页数:14 ,大小:119.73KB ,
资源ID:17006386      下载积分:12 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/17006386.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(机房管理系统数据库设计剖析Word文档格式.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

机房管理系统数据库设计剖析Word文档格式.docx

1、2、创建存储过程和触发器针对一般高校机房管理系统的需求分析、通过对学生上机过程、教学班上机过程、注册过程、充值过程、的内容的数据流程分析一现设计如下数据项和数据结构(1)机房基本信息:包括机房号、机房名、计算机数目、管理人等(2)计算机基本信息:包括计算机IP地址、编号、机房号、品牌、备注等(3)学生基本信息:包括学号、姓名、性名、行政班等(4)用户基本信息:包括用户名、学号、密码、余额等(5)学生充值基本信息:包括用户名、充值时间、金额、办理人等(6)机房收费标准基本信息:包括机房号、金额等(7)学生上机过程登记基本信息:包括计算机IP地址、日期、上机时间、下机时间、学号、上机类型等(8)机

2、房费用统计基本信息:包括计算机IP地址、日期、统计时间、费用等 1.业务流程图 2.数据流图room(机房表) 字段名数据类型能否为空是否为主键说明rnoint否是机房号rnamechar(10)机房名numbersmallint能计算机数目manager管理人computer(计算机表)IPchar(20)计算机IP地址cno编号brandChar(20)品牌noteVarchar(100)备注Student(学生表)是否作为主键snoInt学号snameChar(10)姓名sexChar(2)性别class行政班Usertable(用户表)说明 uname用户名pword密码money余额

3、Prepaid(充值表) ptimedatetime充值时间pmoneysmallmoney金额trans收费人员Standard(收费标准表) stime时间段smoney金额/小时Record(上机过程登记表)begintime上机时间endtime下机时间typeChar(15)上机类型statistik (机房费用统计表) dates日期Snomoneys费用图一 机房实体E-R图 图二 学生实体E-R图机房(机房号,机房名,机器数目,管理人)学生(学号,姓名,性别,行政班)计算机(编号,机房号,品牌,备注)用户(用户名,学号,密码,余额)create database roomon(

4、 name=room_data, filename=E:roomdataroom_data size=5MB, maxsize=10MB,filegrowth=1MB)log on( name=room_logroomlogroom_log2、room(机房表)的创建create table roomrno int not null primary key,rname char(10) not null,number smallint null,manager char(10) not null3、computer(计算机表)的创建create table computerIP char(20

5、) not null primary key,cno smallint not null ,rno int not null,brand char(20) null,note varchar(50) null4、student(学生表)的创建create table studentsno int not null primary key,sname char(10) not null,sex char(2) null,class char(20) not null6、User(用户表)的创建create table usertableuname char(20) not null primar

6、y key,sno int not null,pword char(20) not null,moneys money null,7、prepaid(充值表)的创建 create table prepaiduname char(20) not null,ptime datetime not null,pmoney smallmoney not null,trans char(10) not null,constraint p_primary primary key(uname,ptime)8、standard(收费标准表)的创建create table standardstime char(2

7、0) not null,smoney smallmoney not null,constraint c_primary primary key(rno,stime)11、record(上机过程登记表)的创建create table recordIP char(20) not null,begintime datetime not null,endtime datetime null,type char(15) not null,constraint t1 primary key(IP,begintime)12、statistik(费用统计表)的创建create table statistikd

8、ates datetime not null,moneys smallmoney not null,constraint t2 primary key(IP,dates)1、创建存储过程实现各机房上机费用的统计1)代码create proc s_room(rno int)asselect rname 机房名,sum(moneys) 费用 from statistik inner join computeron computer.IP=statistik.IP inner join room on room.rno=computer.rnowhere room.rno=rnogroup by r

9、name2、创建触发器实现费用登记时,自动修改该生的账户余额。create trigger u_money on statistikfor insertupdate usertableset moneys=moneys-(select moneys from inserted)where sno=(select sno from inserted)2)数据测试查询插入记录前学生的余额select sno 学号,moneys 余额from usertablewhere sno=2011508092执行插入操作insert into statistikvalues(001,getdate(),101,2.5)查询插入记录学生的余额3.创建触发器实现充值时自动修改该生余额create trigger un_money on prepaidset moneys=moneys+(select pmoney from inserted)where uname=(select uname from inserted)select sno 学号,moneys 余额 from usertablegoinsert into prepaidbbb,getdate(),5,个vga select * from prepaid

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1