收藏 分销(赏)

某单位人事管理系统.doc

上传人:天**** 文档编号:4129390 上传时间:2024-07-31 格式:DOC 页数:22 大小:80.54KB 下载积分:10 金币
下载 相关 举报
某单位人事管理系统.doc_第1页
第1页 / 共22页
某单位人事管理系统.doc_第2页
第2页 / 共22页


点击查看更多>>
资源描述
《数据库系统》课程实践任务报告 任务名称;某单位人事管理系统 班 级: 2013计科本 学 号: 38241313115 姓 名: 陈雄 学 号: 38241313122 姓 名: 汪磊 完成日期:2015年6月30日 信息工程学院 计算机系 任务名称 1. 任务的描述 人事管理系统是非常通用的管理信息系统,是企事业单位实现办公自动化的前提和基础.一个公司要正常运作必定有一个健全的人事管理系统,来管理员工的信息,包括员工编号、姓名、性别、民族工资及奖惩考勤情况。除此之外,系统还供员工查询个人和公共信息,管理员对员工信息进行更改或删除,管理公司的人事变更和管理,大大提高公司内部员工管理的工作效率,并要求实现以下功能. 1. 员工信息管理:实现记录在该单位中所有人员的在该单位的员工信息,实现对员工信息的管理,也包括对员工信息的增加、删除、修改等功能。 2. 部门信息管理:实现对该单位中的各个部门的编号、部门相关信息的统计,此时也将单位中的所有人员进行分类管理。 3. 职位调动管理:实现当员工的就职信息发生更改的时候,系统进行相应关联信息的更改,即增加相应的修改信息的同时,员工的信息管理中的对应信息进行修改。 4. 系统管理人员信息管理:实现对相应的系统管理人员的帐号、密码等基本信息的管理功能。 5. 出勤信息管理:实现对每一位员工的出勤状况的记录,记录对应的出勤刷卡机号以及出勤时间的信息管理。 6. 奖惩管理:实现针对于不同的奖惩类型、奖惩金额等信息的管理,实现输入奖惩信息的修改相应的工资信息. 7. 工资管理:实现各个员工工资条目信息的管理。 2.需求分析 本系统主要包括的外部实体有:员工、部门、员工职位调动等,要实现的功能主要有:员工、部门、员工职位调动、管理人员信息管理、出勤信息、工资、奖惩等信息管理。 2。1 系统包含的实体 1、员工(员工编号,姓名,性别,出生日期,学历,身份证号,民族,职称,部门号,职务) 2、个人经历(年份,员工编号,学习经历,任职经历) 3、家庭关系(关系编号,员工编号,亲属关系,亲属姓名) 4、管理人员(管理员帐号,职工编号,密码,级别) 5、出勤(出勤号,员工编号,上班日期,上班时间,下班时间,刷卡机号) 6、刷卡机(刷卡机号) 7、部门(部门号,部门名,领导人员,员工人数) 8、职位调动(调动编号,员工编号,调动前职务,调动后职务,调动前部门号,调动后部门号,调动日期,批复日期,调动原因) 9、奖惩记录(奖惩编号,员工编号,奖惩类型,奖惩金额,奖惩日期,批复部门号,批复日期,奖惩原因) 10、请假记录(请假编号,员工编号,请假时间,销假时间,请假天数,审批人编号) 11、工资(工资编号,员工编号,基本工资,罚款,奖金,结算工资,起始日期,截止日期,发信日期) 2。2 系统包含的实体间联系 根据“任务描述”中提供某单位人事管理系统信息的实际情况,本系统中实体之间应具有如下的联系: 属于部门:部门fi员工,包含属性。类型:一对多。 属于家庭:家庭fi员工,不包含属性.类型:一对一. 关于管理员:管理员fi员工,不包含属性.类型:一对多 关于出勤:员工fi出勤,不包含属性。类型:一对多 属于部门:部门fi职位调动,不包含属性。类型:一对多 2。3 系统需实现的功能 根据“任务描述”中提供的信息以及本学校的实际情况,本系统需具有如下的功能: 1、对本系统中具有的实体及实体间联系的信息的存储; 2、具有如下的静态查询: 1) 对员工、部门、家庭情况、管理人员、奖惩记录、请假记录、工资等信息的查询(用视图实现) 2) 对员工出勤情况整体的查询(用视图实现) 3) 对员工奖惩记录情况整体的查询(有视图实现) 4) 对员工请假记录整体的查询(用视图实现) 5) 对员工工资整体查询(用视图实现) 3、具有如下的动态查询 1) 给定员工,查询该员工总的工资、每月的工资. 2) 给定部门号,查询该部门总的工资金额、每月的工资金额 3) 给定员工,查询该员工总的奖惩金额、每月的奖惩金额 2。4 数据字典 数据字典名:员工 表示对象:员工实体 数据结构:员工编号(char)+姓名(char)+性别(char)+出生日期(datetime)+ 学号(varchar)+ 身份证号(varchar)+民族(varchar)+职称(char)+部门号(char)+职务(char) 数据字典名:个人经历 表示对象:个人经历实体 数据结构:年份(datetime)+员工编号(char)+学习经历(varchar)+任职经历(varchar) 数据字典名:部门 表示对象:部门实体 数据结构:部门号(char)+部门名(char)+领导人员(char)+员工人数(int) 表示对象:家庭关系实体 数据结构:关系编号(char)+员工编号(char)+亲属关系(char)+亲属姓名(char) 数据字典名:职位调动 表示对象:职位调动实体 数据结构:调动编号(char)+员工编号(char)+调动前职务(char)+调动后职务(char)+调动前部门号(char)+调动后部门号(char)+调动日期(datatime)+批复日期(datatime)+调动日期(varchar) 数据字典名:出勤 表示对象:出勤实体 数据结构:出勤号(char)+员工编号(char)+上班日期(datatime)+下班时间(datatime)+刷卡机号(char) 数据字典名:管理人员 表示对象:管理人员实体 数据结构:管理人员帐号(char)+职工编号(char)+密码(char)+级别(char) 数据字典名:刷卡机 表示对象:刷卡机实体 数据结构:刷卡机号(char) 数据字典名:奖惩记录 表示对象:奖惩记录实体 数据结构:奖惩编号(char)+员工编号(char)+奖惩类型(char)+奖惩金额(char)+奖惩日期(datatime)+批复部门号(char)+批复日期(datatime)+奖惩原因(varchar) 数据字典名:工资 表示对象:工资实体 数据结构:工资编号(char)+员工编号(char)+基本工资(money)+罚款(money)+奖金(money)+结算工资(money)+起始时间(datatime)+截止时间(datatime)+发信时间(datatime) 数据字典名:请假记录 表示对象:请假记录实体 数据结构:请假编号(char)+员工编号(char)+请假时间(datatime)+销假时间(datatime)+请假天数(int)+审批人编号(char) 3. 数据库概念数据模型设计 4. 数据库逻辑数据模型设计 5. 数据库物理数据模型设计 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 key FK_出勤_刷卡2_刷卡机 end if; if exists(select 1 from sys.sysforeignkey where role=’FK_出勤2_出勤_出勤’) then alter table 出勤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 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_员工_属于_管理人员’) 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_奖惩_奖惩_员工’) 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_奖惩记录_对应_工资’) 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_服从_服从_职位调动’) 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_职位调动_依赖_部门') 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 key 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 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 exists 奖惩。奖惩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 exists 工资; 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 请假。请假_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, 学习经历 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, 刷卡机号 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 ); /*==============================================================*/ /* Table: 出勤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 */ /*==============================================================*/ create 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 ); /*==============================================================*/ /* Table: 员工 */ /*==============================================================*/ 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, 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 ); /*==============================================================*/ /* 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 */ /*==============================================================*/ create index 奖惩_FK on 奖惩 ( 员工编号1 ASC ); /*==============================================================*/ /* Table: 奖惩记录 */ /*==============================================================*/ create table 奖惩记录 ( 奖惩编号 char(6) not null, 工资编号 char(6) not null, 员工编号 char(4) null, 奖惩类型 char(4)
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服