绩效考核系统 数据库 sql server 代码
时间:2022-06-07
本文章向大家介绍绩效考核系统 数据库 sql server 代码,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
create database PEM;
use PEM;
create table Admin(
adminId int identity(1,1) primary key,
adminName varchar(255) not null,
pswd varchar(255) not null,
sex varchar (255) check(sex in('男','女')) not null
);
create table Department(
depId int identity(1,1) primary key,
depName varchar(255) unique not null,
total int default 0
);
create table Employee(
empId int identity(1,1) primary key,
empName varchar(255) not null,
pswd varchar(255) not null,
sex varchar (255) check(sex in('男','女')) not null,
depId int not null,
foreign key (depId) references Department(depId) on delete cascade on update cascade
);
create table Contact(
empId int ,
contact varchar(255),
tel int not null,
primary key(empId,contact),
foreign key(empId)references Employee(empId) on delete cascade on update cascade
);
create table Test(
testId int identity(1,1)primary key,
testName varchar (255) unique not null,
startTime datetime not null,
endTime datetime not null
);
create table OriginalScore(
testId int,
juryId int ,
empId int ,
workScore smallint check (workScore>=0 and workScore<=100) not null,
primary key(testId,empId,juryId),
foreign key (empId) references Employee(empId) on delete cascade on update cascade,
foreign key (juryId) references Employee(empId),
foreign key (testId) references Test(testId) on delete cascade on update cascade
);
create table TerminalScore(
testId int ,
empId int,
workScore float,
primary key(empId,testId),
foreign key (empId) references Employee(empId) on delete cascade on update cascade,
foreign key (testId) references Test(testId) on delete cascade on update cascade
);
- MySQL 教程
- MySQL 安装
- MySQL 管理与配置
- MySQL PHP 语法
- MySQL 连接
- MySQL 创建数据库
- MySQL 删除数据库
- MySQL 选择数据库
- MySQL 数据类型
- MySQL 创建数据表
- MySQL 删除数据表
- MySQL 插入数据
- MySQL 查询数据
- MySQL where 子句
- MySQL UPDATE 查询
- MySQL DELETE 语句
- MySQL LIKE 子句
- mysql order by
- Mysql Join的使用
- MySQL NULL 值处理
- MySQL 正则表达式
- MySQL 事务
- MySQL ALTER命令
- MySQL 索引
- MySQL 临时表
- MySQL 复制表
- 查看MySQL 元数据
- MySQL 序列 AUTO_INCREMENT
- MySQL 处理重复数据
- MySQL 及 SQL 注入
- MySQL 导出数据
- MySQL 导入数据
- MYSQL 函数大全
- MySQL Group By 实例讲解
- MySQL Max()函数实例讲解
- mysql count函数实例
- MYSQL UNION和UNION ALL实例
- MySQL IN 用法
- MySQL between and 实例讲解
- 微信小程序使用scroll-view做导航栏
- java解析XML的方法
- 听说Mysql你很豪横?-------------各种数据库介绍(为什么Mysql数据库能这么火热)
- Vuex的简单入门
- 听说Mysql你很豪横?-------------管理MySQL数据库基本操作命令
- Axios安装封装api接口
- 排障集锦:九九八十一难之第七难!mysql数据库登录密码忘记了
- Css实现上下无限跳动
- 排障集锦:九九八十一难之第八难!ERROR 2002 (HY000): Can‘t connect to local MySQL server
- Vue Router配置参数、404页面
- 机器学习之决策树三-CART原理与代码实现
- Vue Router路径切换过渡动画
- 听说Mysql你很豪横?-------------深入解析mysql数据库中的索引!
- 听说Mysql你很豪横?-------------深入解析mysql数据库中的事务!
- Struts2笔记