本文主要是介绍CJR招聘网数据库,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
说明:
表之间的一元关系(1-1 1-m m-1)用外键的形式表示,例如 1个求职者对应m个反馈信息,则将求职者id加入反馈信息表;
表之间的二元关系(m-n)添加一张关系表,例如求职者与职位信息的收藏关系为多对多,则添加一张收藏表,包含求职者id与职位信息id的组合外键。
PS: sql脚本在后面,可保存为sql文件直接导入数据库
数据库 cjrjob
1、求职者登录信息表 job_seeker
2、求职者详细信息表 job_seeker_info (外键:主表id(job_seeker_id))
3、反馈信息表 feedback_info (外键:主表id(job_seeker_id))
4、城市列表 job_city
5、职位分类表 job_kind
6、招聘者信息 job_recruiter
7、职位信息表 job_full_info (外键:城市列表id(job_city_id)、职位分类表id(job_kind _id) 、招聘者信息id(job_recruiter )关联表4 5 6 )
8、职位收藏表 job_collection (外键:求职者id(job_seeker_id))
9、职位投递记录表 job_delivery (外键:求职者id(job_seeker_id))
10、 banner图 banner_info
11、公共信息表(网站友情链接、联系方式、版权协议等) public_info
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 8.0.12 : Database - cjrjob
*********************************************************************
*//*!40101 SET NAMES utf8 */;/*!40101 SET SQL_MODE=''*/;/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`cjrjob` /*!40100 DEFAULT CHARACTER SET utf8 */;USE `cjrjob`;/*Table structure for table `banner_info` */DROP TABLE IF EXISTS `banner_info`;CREATE TABLE `banner_info` (`banner_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`img_URI` varchar(50) DEFAULT NULL COMMENT '图片地址',`img_content` varchar(1000) DEFAULT NULL COMMENT '图片描述',`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加日期',PRIMARY KEY (`banner_info_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `banner_info` *//*Table structure for table `feedback_info` */DROP TABLE IF EXISTS `feedback_info`;CREATE TABLE `feedback_info` (`feedback_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`feedback_kind` varchar(20) DEFAULT NULL COMMENT '反馈类型',`feedback_content` text COMMENT '内容',`contact` varchar(50) DEFAULT NULL COMMENT '联系方式',`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '反馈时间',`job_seeker_id` int(10) unsigned NOT NULL COMMENT '用户id',PRIMARY KEY (`feedback_info_id`),KEY `jobseeker_feedback` (`job_seeker_id`),CONSTRAINT `jobseeker_feedback` FOREIGN KEY (`job_seeker_id`) REFERENCES `job_seeker` (`job_seeker_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;/*Data for the table `feedback_info` */insert into `feedback_info`(`feedback_info_id`,`feedback_kind`,`feedback_content`,`contact`,`create_time`,`job_seeker_id`) values (1,'1','dsddddd',NULL,'2018-08-19 17:28:14',1);/*Table structure for table `job_city` */DROP TABLE IF EXISTS `job_city`;CREATE TABLE `job_city` (`job_city_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`job_city_name` varchar(50) DEFAULT NULL COMMENT '城市名称',PRIMARY KEY (`job_city_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `job_city` *//*Table structure for table `job_collection` */DROP TABLE IF EXISTS `job_collection`;CREATE TABLE `job_collection` (`job_collection` int(10) unsigned NOT NULL AUTO_INCREMENT,`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '收藏时间',`job_seeker_id` int(10) unsigned NOT NULL COMMENT '求职者',`job_full_info` int(10) unsigned NOT NULL COMMENT '发布者',PRIMARY KEY (`job_collection`),KEY `job_seeker_id` (`job_seeker_id`),KEY `job_full_info` (`job_full_info`),CONSTRAINT `job_collection_ibfk_1` FOREIGN KEY (`job_seeker_id`) REFERENCES `job_seeker` (`job_seeker_id`),CONSTRAINT `job_collection_ibfk_2` FOREIGN KEY (`job_full_info`) REFERENCES `job_full_info` (`job_full_info_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `job_collection` *//*Table structure for table `job_delivery` */DROP TABLE IF EXISTS `job_delivery`;CREATE TABLE `job_delivery` (`job_delivery_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '投递时间',`job_seeker_id` int(10) unsigned NOT NULL COMMENT '求职者',`job_full_info` int(10) unsigned NOT NULL COMMENT '发布者',PRIMARY KEY (`job_delivery_id`),KEY `job_seeker_id` (`job_seeker_id`),KEY `job_full_info` (`job_full_info`),CONSTRAINT `job_delivery_ibfk_1` FOREIGN KEY (`job_seeker_id`) REFERENCES `job_seeker` (`job_seeker_id`),CONSTRAINT `job_delivery_ibfk_2` FOREIGN KEY (`job_full_info`) REFERENCES `job_full_info` (`job_full_info_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `job_delivery` *//*Table structure for table `job_full_info` */DROP TABLE IF EXISTS `job_full_info`;CREATE TABLE `job_full_info` (`job_full_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`title` varchar(50) DEFAULT NULL COMMENT '标题',`money` varchar(50) DEFAULT NULL COMMENT '薪水',`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发布时间',`welfare` varchar(50) DEFAULT NULL COMMENT '福利',`demand_education` varchar(50) DEFAULT NULL COMMENT '学历要求',`demand_experience` varchar(50) DEFAULT NULL COMMENT '经验要求',`demand_gender` enum('1','2') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '性别要求',`demand_age` varchar(50) DEFAULT NULL COMMENT '年龄要求',`job_location` varchar(50) DEFAULT NULL COMMENT '工作地点',`people_num` varchar(50) DEFAULT NULL COMMENT '人数',`job_content` text COMMENT '职位描述',`job_kind_id` int(10) unsigned NOT NULL COMMENT '职位类别',`job_city_id` int(10) unsigned NOT NULL COMMENT '职位城市',`job_recruiter_id` int(10) unsigned NOT NULL COMMENT '发布者',PRIMARY KEY (`job_full_info_id`),KEY `job_city_id` (`job_city_id`),KEY `job_kind_id` (`job_kind_id`),KEY `job_recruiter_id` (`job_recruiter_id`),CONSTRAINT `job_full_info_ibfk_1` FOREIGN KEY (`job_city_id`) REFERENCES `job_city` (`job_city_id`),CONSTRAINT `job_full_info_ibfk_2` FOREIGN KEY (`job_kind_id`) REFERENCES `job_kind` (`job_kind_id`),CONSTRAINT `job_full_info_ibfk_3` FOREIGN KEY (`job_recruiter_id`) REFERENCES `job_recruiter` (`job_recruiter_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `job_full_info` *//*Table structure for table `job_kind` */DROP TABLE IF EXISTS `job_kind`;CREATE TABLE `job_kind` (`job_kind_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`job_kind_name` varchar(50) DEFAULT NULL COMMENT '职位类别名称',PRIMARY KEY (`job_kind_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `job_kind` *//*Table structure for table `job_recruiter` */DROP TABLE IF EXISTS `job_recruiter`;CREATE TABLE `job_recruiter` (`job_recruiter_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`job_recruiter_name` varchar(50) DEFAULT NULL COMMENT '公司名称',`field` varchar(50) DEFAULT NULL COMMENT '领域',`scale` varchar(50) DEFAULT NULL COMMENT '性质',`nature` varchar(50) DEFAULT NULL COMMENT '规模',`introduction` varchar(50) DEFAULT NULL COMMENT '简介',`logoURI` varchar(50) DEFAULT NULL COMMENT 'logoURI',`location` varchar(50) DEFAULT NULL COMMENT '地点',PRIMARY KEY (`job_recruiter_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `job_recruiter` *//*Table structure for table `job_seeker` */DROP TABLE IF EXISTS `job_seeker`;CREATE TABLE `job_seeker` (`job_seeker_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`username` varchar(50) NOT NULL COMMENT '用户名',`password` varchar(50) NOT NULL COMMENT '密码',`email` varchar(30) NOT NULL COMMENT '邮箱',`role` enum('1','2','3','4') NOT NULL DEFAULT '1' COMMENT '1求职者 2招聘者 3管理员 4备用',`reg_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',PRIMARY KEY (`job_seeker_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;/*Data for the table `job_seeker` */insert into `job_seeker`(`job_seeker_id`,`username`,`password`,`email`,`role`,`reg_time`) values (1,'1','1','1','1','2018-08-19 17:32:23');/*Table structure for table `job_seeker_info` */DROP TABLE IF EXISTS `job_seeker_info`;CREATE TABLE `job_seeker_info` (`job_seeker_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`name` varchar(20) DEFAULT NULL COMMENT '姓名',`birthday` date DEFAULT NULL COMMENT '出生日期',`highest_education` varchar(20) DEFAULT NULL COMMENT '最高学历',`hope_job` varchar(50) DEFAULT NULL COMMENT '期望职位',`phone` varchar(20) DEFAULT NULL COMMENT '电话',`disability_kind` varchar(50) DEFAULT NULL COMMENT '残疾类别',`gender` enum('1','2') DEFAULT NULL COMMENT '性别',`location` varchar(50) DEFAULT NULL COMMENT '现居住地',`work_experience` varchar(50) DEFAULT NULL COMMENT '工作经验',`hope_city` varchar(20) DEFAULT NULL COMMENT '期望城市',`email` varchar(30) DEFAULT NULL COMMENT '邮箱',`job_kind` varchar(20) DEFAULT NULL COMMENT '工作类型',`hope_money` varchar(20) DEFAULT NULL COMMENT '期望薪资',`seeker_status` varchar(20) DEFAULT NULL COMMENT '求职状态',`nation` varchar(20) DEFAULT NULL COMMENT '民族',`marriage` varchar(10) DEFAULT NULL COMMENT '婚姻状况',`household` varchar(50) DEFAULT NULL COMMENT '户籍地区',`graduation_time` date DEFAULT NULL COMMENT '毕业时间',`QQ` varchar(10) DEFAULT NULL COMMENT 'QQ',`expect_industry` varchar(30) DEFAULT NULL COMMENT '期望行业',`seeker_job` varchar(20) DEFAULT NULL COMMENT '求职岗位',`start_time` date DEFAULT NULL COMMENT '到岗时间',`height` varchar(10) DEFAULT NULL COMMENT '身高',`political` varchar(10) DEFAULT NULL COMMENT '政治面貌',`IDnumber` varchar(20) DEFAULT NULL COMMENT '身份证号',`family_phone` varchar(20) DEFAULT NULL COMMENT '家庭电话',`address` varchar(50) DEFAULT NULL COMMENT '通讯地址',`job_seeker_id` int(11) unsigned NOT NULL COMMENT '主表id',`head_img_URI` varchar(50) DEFAULT NULL COMMENT '头像地址',`resume_document_URI` varchar(50) DEFAULT NULL COMMENT '简历地址',PRIMARY KEY (`job_seeker_info_id`),CONSTRAINT `id` FOREIGN KEY (`job_seeker_info_id`) REFERENCES `job_seeker` (`job_seeker_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `job_seeker_info` *//*Table structure for table `public_info` */DROP TABLE IF EXISTS `public_info`;CREATE TABLE `public_info` (`public_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`kind` varchar(50) DEFAULT NULL COMMENT '所属类别',`name` varchar(50) DEFAULT NULL COMMENT '名称',`url` varchar(50) DEFAULT NULL COMMENT '链接',`content` text COMMENT '内容',PRIMARY KEY (`public_info_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `public_info` *//*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
这篇关于CJR招聘网数据库的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!