当前位置:网站首页>[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 '.
*
边栏推荐
- Buffer pool of MySQL notes
- General paging (2)
- 华为云原生——数据开发与DataFactory
- Global and Chinese market for sensor screwdrivers 2022-2028: Research Report on technology, participants, trends, market size and share
- C#【高级篇】 C# 接口(Interface)
- 云原生入门+容器概念介绍
- Global and Chinese market of centrifugal pumps 2022-2028: Research Report on technology, participants, trends, market size and share
- What does the hyphen mean for a block in Twig like in {% block body -%}?
- What are outer chain and inner chain?
- Vscode+anaconda+jupyter reports an error: kernel did with exit code
猜你喜欢
![[ten minutes] manim installation 2022](/img/54/7b895d785c7866271f06ff49cb20aa.png)
[ten minutes] manim installation 2022

Practical debugging skills

Mathematical solution of Joseph Ring

QT中foreach的使用

Redis is used in Windows system

X Book 6.89 shield unidbg calling method

Stc89c52/90c516rd/89c516rd DHT11 temperature and humidity sensor drive code

Buffer pool of MySQL notes

专升本语文资源整理

Usage record of unity input system (instance version)
随机推荐
X Book 6.89 shield unidbg calling method
1151_ Makefile learning_ Static matching pattern rules in makefile
Redis is used in Windows system
The 5-year Android development interview took 20 days to join Alibaba
第2章 控制结构和函数(编程题)
【十分钟】manim安装 2022
Realization of BFS in C language by storing adjacency matrix of graph
C [advanced] C interface
[ten minutes] manim installation 2022
What are the defaults for Binding. Mode=Default for WPF controls?
Learning cyclic redundancy CRC check
[FAQ] page cross domain and interface Cross Domain
深入浅出掌握grpc通信框架
ReSharper 7. Can X be used with vs2013 preview? [off] - can resharper 7 x be used with VS2013 preview? [closed]
Use of custom MVC
laravel9本地安裝
[QT] QMap使用详解
HOOK Native API
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?