基于ip地址的虚拟主机配置

mkdir   /mnt/shufan 
mount   /dev/cdrom   /mnt/shufan 
ls   /mnt/shufan 
ls  /etc/yum.repos.d/
rm  -rf  /etc/yum.repos.d/*.repo
yum-config-manager  --add  file:///mnt/shufan 
yum clean all                
 yum repolist all

yum  -y  install httpd  mariadb.x86_64  mariadb-server.x86_64 

systemctl restart mariadb

systemctl status  mariadb 

创建表格:

员工信息表(employee),字段:员工号(eno)、姓名(ename)、性别(sex)、项目组(groups);

create database couman;  

show databases;  

use couman; 

 create table employee(eno varchar(10 ) not null,ename  varchar(30) not null,sex int(5) default 0,groups varchar(20),primary key(eno));

create table score(scid int(10) not null auto_increment,eno varchar(10) not null,exid varchar(10) not null,score int(5),primary key (scid), constraint foreign key (exid) references exam(exid) , constraint foreign key (eno) references employee(eno)); 

考核内容表(exam),字段:内容序号(exid)、考核内容(cname);

create table exam(exid varchar(10) not null,exname varchar(50) not null,primary key(exid));

员工考核信息表(score,)字段:序号(scid)、员工号(eno)、内容序号(exid)、成绩(score)

create table score(scid int(10) not null auto_increment,eno varchar(10) not null,exid varchar(10) not null,score int(5),primary key (scid), constraint foreign key (exid) references exam(exid) , constraint foreign key (eno) references employee(eno)); 

插入数据

insert into employee  (eno,ename,sex,groups) values(1001,'wangli',1,'dgroup01');

insert into employee  (eno,ename,sex,groups) values(1002,'liuning',1,'dgroup01'); 

  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值