- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
.
.
use kjq111007307
/*创建一个部门信息表
包含“部门号,部门名,部门经理,人数”属性列*/
create table department
(depart_no char(2) primary key,
depart_name char(30) not null,
depart_manage char(6) not null,
depart_people int not null
)
/*创建一个职位信息表
包含“职位,基本薪资,福利,失业保险,住房公积金”属性列*/
create table position
(pos char(30) primary key,
basesalary float not null,
benefits float not null,
insurances float not null,
housing_funds float not null
)
/*创建一个职工信息表
包含职工号,职工名,性别,年龄,学历,部门号,职位属性列*/
create table staff_message
(staff_no char(4) primary key,
staff_name char(10) not null,
staff_sex char(2) check (staff_sex in(男,女)),
staff_age int not null,
staff_edu char(10) not null,
staff_dep char(2) not null,
staff_job char(30) not null,
foreign key (staff_dep) references department(depart_no),
foreign key (staff_job) references position(pos)
)
/*创建一个员工考勤表
包含“职工号,年月,迟到,缺勤,加班”属性列*/
create table staff_days
(staff_no char(4),
month_date char(6),
staff_late int not null,
staff_absent int not null,
workoverdays int not null,
primary key(staff_no,month_date)
)
/*创建一个薪资表
包含“职工号,年月,奖金,罚金,真实薪资”属性列*/
create table salary
(staff_no char(4),
month_date char(6),
addsalary float not null,
subsalary float not null,
relsalary float not null,
primary key(staff_no,month_date)
)
create index salary_index on salary(month_date asc,staff_no asc);
/*部门表信息的录入*/
/*经理室*/
insert
into department
values(01,manage_department,王栋,1);
/*财务科*/
insert
into department
values(02,financial_department,张鹏,3);
/*技术科*/
insert
into department
values(03,plan_department,代淑英,5);
/*销售科*/
insert
into department
values(04,market_department,金加容,6);
/*职位表信息的录入*/
/*经理*/
insert
into position
values(manager,4500,1125,-45,-36);
/*副经理*/
insert
into position
values(assistant_manager,4000,1000,-40,-32);
/*办事*/
insert
into position
values(clerk,3500,875,-35,-28);
/*助理*/
insert
into position
values(assistant,2000,500,-20,-16);
/*职工信息表信息的录入*/
insert
into staff_message
values(0101,王栋,男,38,硕士,
文档评论(0)