




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、数据库系统课程实践任务报告任务名称;某单位人事管理系统 班 级: 2013计科本 学 号: 姓 名: 陈雄 学 号: 姓 名: 汪磊 完成日期: 2015年6月30日 信息工程学院 计算机系任务名称1 任务的描述人事管理系统是非常通用的管理信息系统,是企事业单位实现办公自动化的前提和基础。一个公司要正常运作必定有一个健全的人事管理系统,来管理员工的信息,包括员工编号、姓名、性别、民族工资及奖惩考勤情况。除此之外,系统还供员工查询个人和公共信息,管理员对员工信息进行更改或删除,管理公司的人事变更和管理,大大提高公司内部员工管理的工作效率,并要求实现以下功能。1 员工信息管理:实现记录在该单位中所
2、有人员的在该单位的员工信息,实现对员工信息的管理,也包括对员工信息的增加、删除、修改等功能。2 部门信息管理:实现对该单位中的各个部门的编号、部门相关信息的统计,此时也将单位中的所有人员进行分类管理。3 职位调动管理:实现当员工的就职信息发生更改的时候,系统进行相应关联信息的更改,即增加相应的修改信息的同时,员工的信息管理中的对应信息进行修改。4 系统管理人员信息管理:实现对相应的系统管理人员的帐号、密码等基本信息的管理功能。5 出勤信息管理:实现对每一位员工的出勤状况的记录,记录对应的出勤刷卡机号以及出勤时间的信息管理。6 奖惩管理:实现针对于不同的奖惩类型、奖惩金额等信息的管理,实现输入奖
3、惩信息的修改相应的工资信息。7 工资管理:实现各个员工工资条目信息的管理。2需求分析本系统主要包括的外部实体有:员工、部门、员工职位调动等,要实现的功能主要有:员工、部门、员工职位调动、管理人员信息管理、出勤信息、工资、奖惩等信息管理。2.1 系统包含的实体1、员工(员工编号,姓名,性别,出生日期,学历,身份证号,民族,职称,部门号,职务)2、个人经历(年份,员工编号,学习经历,任职经历)3、家庭关系(关系编号,员工编号,亲属关系,亲属姓名)4、管理人员(管理员帐号,职工编号,密码,级别)5、出勤(出勤号,员工编号,上班日期,上班时间,下班时间,刷卡机号)6、刷卡机(刷卡机号)7、部门(部门号
4、,部门名,领导人员,员工人数)8、职位调动(调动编号,员工编号,调动前职务,调动后职务,调动前部门号,调动后部门号,调动日期,批复日期,调动原因)9、奖惩记录(奖惩编号,员工编号,奖惩类型,奖惩金额,奖惩日期,批复部门号,批复日期,奖惩原因)10、请假记录(请假编号,员工编号,请假时间,销假时间,请假天数,审批人编号)11、工资(工资编号,员工编号,基本工资,罚款,奖金,结算工资,起始日期,截止日期,发信日期)2.2 系统包含的实体间联系根据“任务描述”中提供某单位人事管理系统信息的实际情况,本系统中实体之间应具有如下的联系:属于部门:部门fi员工,包含属性。类型:一对多。属于家庭:家庭fi员
5、工,不包含属性。类型:一对一。关于管理员:管理员fi员工,不包含属性。类型:一对多关于出勤:员工fi出勤,不包含属性。类型:一对多属于部门:部门fi职位调动,不包含属性。类型:一对多2.3 系统需实现的功能根据“任务描述”中提供的信息以及本学校的实际情况,本系统需具有如下的功能:1、对本系统中具有的实体及实体间联系的信息的存储;2、具有如下的静态查询:1) 对员工、部门、家庭情况、管理人员、奖惩记录、请假记录、工资等信息的查询(用视图实现)2) 对员工出勤情况整体的查询(用视图实现)3) 对员工奖惩记录情况整体的查询(有视图实现)4) 对员工请假记录整体的查询(用视图实现)5) 对员工工资整体
6、查询(用视图实现)3、具有如下的动态查询1) 给定员工,查询该员工总的工资、每月的工资。2) 给定部门号,查询该部门总的工资金额、每月的工资金额3) 给定员工,查询该员工总的奖惩金额、每月的奖惩金额2.4 数据字典数据字典名:员工表示对象:员工实体数据结构:员工编号(char)+姓名(char)+性别(char)+出生日期(datetime)+ 学号(varchar)+ 身份证号(varchar)+民族(varchar)+职称(char)+部门号(char)+职务(char)数据字典名:个人经历表示对象:个人经历实体数据结构:年份(datetime)+员工编号(char)+学习经历(varch
7、ar)+任职经历(varchar)数据字典名:部门表示对象:部门实体数据结构:部门号(char)+部门名(char)+领导人员(char)+员工人数(int)表示对象:家庭关系实体数据结构:关系编号(char)+员工编号(char)+亲属关系(char)+亲属姓名(char)数据字典名:职位调动表示对象:职位调动实体数据结构:调动编号(char)+员工编号(char)+调动前职务(char)+调动后职务(char)+调动前部门号(char)+调动后部门号(char)+调动日期(datatime)+批复日期(datatime)+调动日期(varchar)数据字典名:出勤表示对象:出勤实体数据结构
8、:出勤号(char)+员工编号(char)+上班日期(datatime)+下班时间(datatime)+刷卡机号(char)数据字典名:管理人员表示对象:管理人员实体数据结构:管理人员帐号(char)+职工编号(char)+密码(char)+级别(char)数据字典名:刷卡机表示对象:刷卡机实体数据结构:刷卡机号(char)数据字典名:奖惩记录表示对象:奖惩记录实体数据结构:奖惩编号(char)+员工编号(char)+奖惩类型(char)+奖惩金额(char)+奖惩日期(datatime)+批复部门号(char)+批复日期(datatime)+奖惩原因(varchar)数据字典名:工资表示对象
9、:工资实体数据结构:工资编号(char)+员工编号(char)+基本工资(money)+罚款(money)+奖金(money)+结算工资(money)+起始时间(datatime)+截止时间(datatime)+发信时间(datatime)数据字典名:请假记录表示对象:请假记录实体数据结构:请假编号(char)+员工编号(char)+请假时间(datatime)+销假时间(datatime)+请假天数(int)+审批人编号(char)3. 数据库概念数据模型设计4 数据库逻辑数据模型设计5. 数据库物理数据模型设计if exists(select 1 from sys.sysforeignke
10、y where role=FK_个人经历_拥有_员工) then alter table 个人经历 delete foreign key FK_个人经历_拥有_员工end if;if exists(select 1 from sys.sysforeignkey where role=FK_出勤_刷卡2_刷卡机) then alter table 出勤 delete foreign key FK_出勤_刷卡2_刷卡机end if;if exists(select 1 from sys.sysforeignkey where role=FK_出勤2_出勤_出勤) then alter table
11、出勤2 delete foreign key FK_出勤2_出勤_出勤end if;if exists(select 1 from sys.sysforeignkey where role=FK_出勤2_出勤2_员工) then alter table 出勤2 delete foreign key FK_出勤2_出勤2_员工end if;if exists(select 1 from sys.sysforeignkey where role=FK_刷卡机_刷卡_出勤) then alter table 刷卡机 delete foreign key FK_刷卡机_刷卡_出勤end if;if e
12、xists(select 1 from sys.sysforeignkey where role=FK_员工_信息2_家庭关系) then alter table 员工 delete foreign key FK_员工_信息2_家庭关系end if;if exists(select 1 from sys.sysforeignkey where role=FK_员工_属于_管理人员) then alter table 员工 delete foreign key FK_员工_属于_管理人员end if;if exists(select 1 from sys.sysforeignkey where
13、role=FK_员工_拥有2_个人经历) then alter table 员工 delete foreign key FK_员工_拥有2_个人经历end if;if exists(select 1 from sys.sysforeignkey where role=FK_奖惩_奖惩_员工) then alter table 奖惩 delete foreign key FK_奖惩_奖惩_员工end if;if exists(select 1 from sys.sysforeignkey where role=FK_奖惩_奖惩2_奖惩记录) then alter table 奖惩 delete
14、foreign key FK_奖惩_奖惩2_奖惩记录end if;if exists(select 1 from sys.sysforeignkey where role=FK_奖惩记录_对应_工资) then alter table 奖惩记录 delete foreign key FK_奖惩记录_对应_工资end if;if exists(select 1 from sys.sysforeignkey where role=FK_家庭关系_信息_员工) then alter table 家庭关系 delete foreign key FK_家庭关系_信息_员工end if;if exists
15、(select 1 from sys.sysforeignkey where role=FK_服从_服从_职位调动) then alter table 服从 delete foreign key FK_服从_服从_职位调动end if;if exists(select 1 from sys.sysforeignkey where role=FK_服从_服从2_员工) then alter table 服从 delete foreign key FK_服从_服从2_员工end if;if exists(select 1 from sys.sysforeignkey where role=FK_职
16、位调动_依赖_部门) then alter table 职位调动 delete foreign key FK_职位调动_依赖_部门end if;if exists(select 1 from sys.sysforeignkey where role=FK_请假_请假_员工) then alter table 请假 delete foreign key FK_请假_请假_员工end if;if exists(select 1 from sys.sysforeignkey where role=FK_请假_请假2_请假记录) then alter table 请假 delete foreign k
17、ey FK_请假_请假2_请假记录end if;drop index if exists 个人经历.拥有_FK;drop index if exists 个人经历.个人经历_PK;drop table if exists 个人经历;drop index if exists 出勤.刷卡2_FK;drop index if exists 出勤.出勤_PK;drop table if exists 出勤;drop index if exists 出勤2.出勤_FK;drop index if exists 出勤2.出勤2_FK;drop index if exists 出勤2.出勤2_PK;drop
18、 table if exists 出勤2;drop index if exists 刷卡机.刷卡_FK;drop index if exists 刷卡机.刷卡机_PK;drop table if exists 刷卡机;drop index if exists 员工.拥有2_FK;drop index if exists 员工.信息2_FK;drop index if exists 员工.属于_FK;drop index if exists 员工.员工_PK;drop table if exists 员工;drop index if exists 奖惩.奖惩_FK;drop index if e
19、xists 奖惩.奖惩2_FK;drop index if exists 奖惩.奖惩_PK;drop table if exists 奖惩;drop index if exists 奖惩记录.对应_FK;drop index if exists 奖惩记录.奖惩记录_PK;drop table if exists 奖惩记录;drop index if exists 家庭关系.信息_FK;drop index if exists 家庭关系.家庭关系_PK;drop table if exists 家庭关系;drop index if exists 工资.工资_PK;drop table if ex
20、ists 工资;drop index if exists 服从.服从_FK;drop index if exists 服从.服从2_FK;drop index if exists 服从.服从_PK;drop table if exists 服从;drop index if exists 管理人员.管理人员_PK;drop table if exists 管理人员;drop index if exists 职位调动.依赖_FK;drop index if exists 职位调动.职位调动_PK;drop table if exists 职位调动;drop index if exists 请假.请
21、假_FK;drop index if exists 请假.请假2_FK;drop index if exists 请假.请假_PK;drop table if exists 请假;drop index if exists 请假记录.请假记录_PK;drop table if exists 请假记录;drop index if exists 部门.部门_PK;drop table if exists 部门;/*=*/* Table: 个人经历 */*=*/create table 个人经历 ( 年份 timestamp not null, 员工编号1 char(4) not null, 学习经历
22、 varchar(50) null, 任职经历 varchar(50) null, 员工编号 char(4) null, constraint PK_个人经历 primary key (年份);/*=*/* Index: 个人经历_PK */*=*/create unique index 个人经历_PK on 个人经历 (年份 ASC);/*=*/* Index: 拥有_FK */*=*/create index 拥有_FK on 个人经历 (员工编号1 ASC);/*=*/* Table: 出勤 */*=*/create table 出勤 ( 出勤号 char(6) not null, 刷卡
23、机号 char(4) not null, 员工编号 char(4) null, 上班日期 timestamp null, 上班时间 timestamp null, 下班时间 timestamp null, 刷卡机号1 char(4) null, constraint PK_出勤 primary key (出勤号);/*=*/* Index: 出勤_PK */*=*/create unique index 出勤_PK on 出勤 (出勤号 ASC);/*=*/* Index: 刷卡2_FK */*=*/create index 刷卡2_FK on 出勤 (刷卡机号 ASC);/*=*/* Tab
24、le: 出勤2 */*=*/create table 出勤2 ( 出勤号 char(6) not null, 员工编号1 char(4) not null, constraint PK_出勤2 primary key (出勤号, 员工编号1);/*=*/* Index: 出勤2_PK */*=*/create unique index 出勤2_PK on 出勤2 (出勤号 ASC,员工编号1 ASC);/*=*/* Index: 出勤2_FK */*=*/create index 出勤2_FK on 出勤2 (员工编号1 ASC);/*=*/* Index: 出勤_FK */*=*/creat
25、e index 出勤_FK on 出勤2 (出勤号 ASC);/*=*/* Table: 刷卡机 */*=*/create table 刷卡机 ( 刷卡机号 char(4) not null, 出勤号 char(6) not null, constraint PK_刷卡机 primary key (刷卡机号);/*=*/* Index: 刷卡机_PK */*=*/create unique index 刷卡机_PK on 刷卡机 (刷卡机号 ASC);/*=*/* Index: 刷卡_FK */*=*/create index 刷卡_FK on 刷卡机 (出勤号 ASC);/*=*/* Tab
26、le: 员工 */*=*/create table 员工 ( 员工编号1 char(4) not null, 管理员帐号 char(4) not null, 关系编号 char(10) not null, 年份 timestamp not null, 姓名 char(10) null, 性别 char(2) null, 出生日期 timestamp null, 学历 varchar(32) null, 身份证号 varchar(32) null, 民族 varchar(16) null, 职称 char(10) null, 职务 char(4) null, 部门号1 char(4) null,
27、 constraint PK_员工 primary key (员工编号1);/*=*/* Index: 员工_PK */*=*/create unique index 员工_PK on 员工 (员工编号1 ASC);/*=*/* Index: 属于_FK */*=*/create index 属于_FK on 员工 (管理员帐号 ASC);/*=*/* Index: 信息2_FK */*=*/create index 信息2_FK on 员工 (关系编号 ASC);/*=*/* Index: 拥有2_FK */*=*/create index 拥有2_FK on 员工 (年份 ASC);/*=
28、*/* Table: 奖惩 */*=*/create table 奖惩 ( 员工编号1 char(4) not null, 奖惩编号 char(6) not null, constraint PK_奖惩 primary key (员工编号1, 奖惩编号);/*=*/* Index: 奖惩_PK */*=*/create unique index 奖惩_PK on 奖惩 (员工编号1 ASC,奖惩编号 ASC);/*=*/* Index: 奖惩2_FK */*=*/create index 奖惩2_FK on 奖惩 (奖惩编号 ASC);/*=*/* Index: 奖惩_FK */*=*/cre
29、ate index 奖惩_FK on 奖惩 (员工编号1 ASC);/*=*/* Table: 奖惩记录 */*=*/create table 奖惩记录 ( 奖惩编号 char(6) not null, 工资编号 char(6) not null, 员工编号 char(4) null, 奖惩类型 char(4) null, 奖惩金额 numeric(8,2) null, 奖惩日期 timestamp null, 批复部门号 char(4) null, 批复日期 timestamp null, 奖惩原因 varchar(50) null, constraint PK_奖惩记录 primary k
30、ey (奖惩编号);/*=*/* Index: 奖惩记录_PK */*=*/create unique index 奖惩记录_PK on 奖惩记录 (奖惩编号 ASC);/*=*/* Index: 对应_FK */*=*/create index 对应_FK on 奖惩记录 (工资编号 ASC);/*=*/* Table: 家庭关系 */*=*/create table 家庭关系 ( 关系编号 char(10) not null, 员工编号1 char(4) not null, 员工编号 char(4) null, 亲属关系 char(50) null, 亲属姓名 char(10) null, constrai
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 20以内三个数加减混合运算竞赛试题试题
- 慢性缺血性心脏病的健康宣教
- 2024届天津河北区中考试题猜想数学试卷含解析
- 竞选图书馆管理部
- 应收账款管理开题答辩
- 文化价值观培训
- 2025合同范本食堂肉类采购合同
- 贵州季期第三实验校2024年中考数学对点突破模拟试卷含解析
- 贵州省毕节织金县2024年中考四模数学试题含解析
- 知识能力技术
- 矿石采购合同范本
- 2023学年完整公开课版《认识洗衣机》
- 热力管道装置工程施工记录表
- 特殊过程焊接工艺确认
- 平移和旋转的应用
- GB/T 8411.3-2009陶瓷和玻璃绝缘材料第3部分:材料性能
- GB/T 4857.17-2017包装运输包装件基本试验第17部分:编制性能试验大纲的通用规则
- “两区三厂”专项施工方案
- 汽车消声器设计课件
- 调试报告-交换机
- 屋面防水施工技术PPT (2020,44P)
评论
0/150
提交评论