当前位置:网站首页>[operation] getting started with MySQL on May 23, 2022
[operation] getting started with MySQL on May 23, 2022
2022-06-30 03:39:00 【Sprite. Nym】
create table tb_college
(
college_id int comment ' College number ',
college_name varchar(15) not null comment ' The name of the College ',
college_desc varchar(1000) comment ' College Introduction ',
college_birth date comment ' Establishment date of the College ',
college_url varchar(100) comment ' College website ',
primary key (college_id)
)engine=innodb comment ' College schedule ';
create table tb_teacher
(
teacher_id int primary key comment ' Teacher's job number ',
teacher_name varchar(30) not null comment ' Teacher's name ',
teacher_gender boolean default 1 comment ' Gender of Teachers ',
teacher_title varchar(10) default ' Assistant ' comment ' Teacher title ',
teacher_birth date comment ' Teacher's birthday ',
college__id int comment ' College number ',
foreign key(college__id) references tb_college(college_id)
on update cascade
on delete cascade
)engine=innodb comment ' Teachers list ';
create table tb_course
(
course_id int primary key comment ' Course number ',
course_name varchar(15) not null comment ' Course name ',
course_score decimal(2,1) default 0.5 comment ' course credit ',
course_semester int comment ' The first semester ',
course_teacher_id int,
course_college_id int,
foreign key(course_teacher_id) references tb_teacher(teacher_id)
on update cascade
on delete cascade,
foreign key(course_college_id) references tb_college(college_id)
on update cascade
on delete cascade
)engine=innodb comment ' The curriculum ';
*
For the first semester 2 An integer mn Express , ten m It means the first one m school year , bits n take 0 Last semester , take 1 It means next semester
*
insert into tb_college(college_id, college_name, college_desc, college_birth, college_url) value(
'1',
' College of biological science and Engineering ',
' School of Bioscience and engineering, South China University of technology in 2004 Founded in , Located in the beautiful campus of South China University of technology . The college has an independent teaching and research building , Complete facilities , Covers an area of 15000 Square meters , It provides a good space for Discipline Construction and development . at present , Students in school 1023 people , among , Undergraduate 483 people , Graduate student 540 people ; The total number of faculty and staff of the college is 75 people , The teacher series 55 people , professor 25 people , associate professor 26 people , The number of full-time teachers with professional titles above the vice senior level accounts for 93%; Having a doctor's degree accounts for% of the total number of teachers 98%; Including double employed academicians 1 people 、 Distinguished professor of Changjiang Scholars 1 people 、 Chief of national key R & D projects 3 name ; Now there are primary disciplines in biology ( Including biochemistry and molecular biology 、 Cell biology 、 microbiology 、 Biophysics and physiology 、 Second level discipline of medical biology ) And the second level discipline of fermentation engineering , Master's degree in bioengineering and pharmacy , And bioengineering 、 Biotechnology and biopharmaceutical . With the main force of the college “ Biology and biochemistry ” Before entering the world 1% Ranking .',
'2004-01-01',
'http://www2.scut.edu.cn/biology/main.htm'
);
insert into tb_college(college_id, college_name, college_desc, college_birth, college_url) value(
'2',
' School of mechanical and automotive engineering ',
' The school of mechanical and automotive engineering of South China University of technology is located at the West Lake of Wushan campus, Tianhe District, Guangzhou , Incorporated in 2008 year 1 month , By the former college of mechanical engineering 、 College of industrial equipment and control engineering 、 The College of automotive engineering is a combination of three colleges , It is one of the largest colleges in South China University of technology . The school has a long history , It can be traced back to 1918 The Machinery Department of Guangdong provincial first class a industrial school established in . The college has a mechanical manufacturing engineering department 、 Department of mechanical and electronic engineering 、 Department of mechanics 、 Department of automotive engineering 、 Department of industrial equipment and control engineering 、 Institute of advanced manufacturing technology and equipment for polymer materials 、 Institute of metal material preparation, forming and equipment 、 Engineering training center and other teaching and scientific research administrative institutions , Have teaching 、 Area of scientific research and office space 3.78 Thousands of square meters , All kinds of scientific instruments and equipment are nearly 2 Ten thousand units . Have 2 A National Engineering Research Center 、1 A national engineering laboratory ,2 National and local joint engineering laboratories ,23 Provincial and ministerial scientific research bases 、3 A national experimental teaching demonstration center .',
'2008-01-01',
'http://www2.scut.edu.cn/smae/main.htm'
);
insert into tb_teacher(teacher_id, teacher_name, teacher_gender, teacher_title, teacher_birth) values(
'1001',
' Wangjufang ',
'0',
' professor ',
'1973-09-01'
),
(
'1002',
' Lin Ying ',
'0',
' professor ',
'1962-06-01'
),
(
'1003',
' Panli ',
'1',
' professor ',
'1954-01-01'
),
(
'1004',
' Zhengsuiping ',
'1',
' professor ',
'1972-01-01'
),
(
'1005',
' Hanshuangyan ',
'0',
' professor ',
'1976-06-01'
)
;
update tb_teacher set college__id = 1 where teacher_id = 1001;
update tb_teacher set college__id = 1 where teacher_id = 1002;
update tb_teacher set college__id = 1 where teacher_id = 1003;
update tb_teacher set college__id = 1 where teacher_id = 1004;
update tb_teacher set college__id = 1 where teacher_id = 1005;
*
Forgot to add the college number ... One by one ...
*
insert into tb_course(course_id, course_name, course_score, course_semester, course_teacher_id, course_college_id) values(
'100001',
' Microbiology experiments ',
'2',
'21',
'1001',
'1'
),
(
'100002',
' Cell microbiology ',
'1.5',
'50',
'1001',
'1'
),
(
'100003',
' Microbial pharmacology ',
'2.5',
'51',
'1001',
'1'
),
(
'100004',
' Enzyme engineering ',
'1',
'30',
'1002',
'1'
),
(
'100005',
' Fermentation engineering ',
'2',
'31',
'1002',
'1'
),
(
'100006',
' Microbiomics ',
'2',
'31',
'1002',
'1'
),
(
'100007',
' microbiology ',
'4',
'21',
'1003',
'1'
),
(
'100008',
' Microbial genetics ',
'4',
'60',
'1003',
'1'
),
(
'100009',
' biochemistry ',
'4',
'21',
'1004',
'1'
),
(
'100010',
' Fermentation engineering ',
'2',
'31',
'1004',
'1'
),
(
'100011',
' Metabolic engineering ',
'2',
'21',
'1004',
'1'
),
(
'100012',
' genetic engineering ',
'4',
'21',
'1005',
'1'
),
(
'100013',
' immunology ',
'2',
'31',
'1005',
'1'
),
(
'100014',
' Modern biochemical experimental technology ',
'1',
'30',
'1005',
'1'
)
;
*
If there are too many students in one class, they should be divided into several teachers , Just add it as two courses , For example, above ' Fermentation engineering '.
*
边栏推荐
- [practical skills] how to write agile development documents
- Global and Chinese markets for active transdermal drug delivery devices 2022-2028: Research Report on technology, participants, trends, market size and share
- Selenium environment installation, 8 elements positioning --01
- Feign 坑
- Global and Chinese market of bulk acoustic wave devices 2022-2028: Research Report on technology, participants, trends, market size and share
- A GPU approach to particle physics
- What are outer chain and inner chain?
- How do college students make money by programming| My way to make money in College
- Redis在windows系统中使用
- Possible problems in MySQL cross database operation with database name
猜你喜欢
dbt产品初体验
QT中foreach的使用
F1c100s self made development board debugging process
Laravel9 local installation
[QT] QMap使用详解
QT中foreach的使用
Redis high concurrency distributed locks (learning summary)
X书6.89版本shield-unidbg调用方式
11: I came out at 11:04 after the interview. What I asked was really too
unity input system 使用记录(实例版)
随机推荐
4-4 beauty ranking (10 points)
laravel9本地安装
[practical skills] how to write agile development documents
【笔记】2022.5.27 通过pycharm操作MySQL
Stc89c52/90c516rd/89c516rd DHT11 temperature and humidity sensor drive code
December2020 - true questions and analysis of C language (Level 2) in the youth level examination of the Electronic Society
专升本高数(四)
X书6.89版本shield-unidbg调用方式
51 single chip microcomputer indoor environment monitoring system, mq-2 smoke sensor and DHT11 temperature and humidity sensor, schematic diagram, C programming and simulation
11: I came out at 11:04 after the interview. What I asked was really too
If you can tell whether the external stock index futures trading platform I am trading is formal and safe?
What does the hyphen mean for a block in Twig like in {% block body -%}?
Huawei interview question: divide candy
【作业】2022.5.23 MySQL入门
Tidb 6.0: making Tso more efficient tidb Book rush
Is the largest layoff and salary cut on the internet coming?
[FAQ] page cross domain and interface Cross Domain
【个人总结】学习计划
unity input system 使用记录(实例版)
A GPU approach to particle physics