Basic operation of database
database
Basic concepts of database
It is more convenient to manage the data in developmentPreviously, data was managed through IO flow
Use the character stream to read one line of data at a timeEncapsulate the read data as an objectAdd multiple objects to the collectionTraverse the collection to determine whether the object is the object ...
Added by T_Hayden on Thu, 10 Feb 2022 18:20:03 +0200
k8s set up mysql master-slave synchronization
1. mysql master image configuration
first, we need to obtain the dockerfile file from the docker hub official website for subsequent modifications. The address is as follows: https://github.com/docker-library/mysql.git then copy one copy of the 8.0 folder and name the other 8.0_slave. Enter the 8.0 folder, where ther ...
Added by andrewburgess on Thu, 10 Feb 2022 16:19:38 +0200
Use of advanced Select statements (key points)
1. De duplication query
According to the database tables and data created before, we put forward a demand to query the student numbers of all students who took the exam
select `studentno` from `result` --Query the student numbers of all students with grades
According to the results, we can see that there are a lot of duplicates in the dat ...
Added by bertfour on Thu, 10 Feb 2022 15:58:02 +0200
Summary of sub queries used in MySQL
1. Classification of sub query
1.1. Non associated subquery
Subquery statements can be executed separately without reference to any content in the included statement. It is called non associated subquery.
1.1.1. Single row single column subquery
The subquery statement returns a single row and single column table. This type of subque ...
Added by veveu on Thu, 10 Feb 2022 15:28:48 +0200
Security framework shiro
1, What is shiro
Apache Shiro is a powerful and easy-to-use Java security framework that performs authentication, authorization, password, and session management. With Shiro's easy to understand API, you can get any application quickly and easily, from the smallest mobile application to the largest network and enterprise application. Develop ...
Added by rokchik on Thu, 10 Feb 2022 09:09:58 +0200
MySQL learning notes 1
Operation database
Operation database
Several basic database operation commands:
update user set password=password('123456')where user='root'; Change Password
flush privileges; Refresh database
show databases; Show all databases
use dbname;Open a database
show tables; show database mysql All tables in
describe user; Display table mysql ...
Added by shibobo12 on Thu, 10 Feb 2022 06:31:44 +0200
2021-05-15 basic part of MySQL interview questions
Database MySql Basics
1. Function classification? What functions are often used?
lower upper substr length Trim (remove the leading and trailing spaces and do not remove the spaces in the middle) str_to_date(%Y-%m-%d) date_format Format (decimal) round Random number ifnull (if empty, replace with 0) Aggregate function / grouping function Grou ...
Added by Peggy on Thu, 10 Feb 2022 06:30:10 +0200
Database (mysql) query statement exercise (–)
Pre observation tips
The database of this query exercise comes from the Internet, you can baidu yourself!!!!
database
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for dept
-- ----------------------------
DROP TABLE IF EXISTS `dept`;
CREATE TABLE `dept` (
`DEPTNO` int(11) NOT NULL COMMENT 'Department number' ...
Added by Revlet on Thu, 10 Feb 2022 02:34:12 +0200
Explain and index best practice
1, Explain tool introduction
Use the EXPLAIN keyword to simulate the optimizer to execute SQL statements and analyze the performance bottlenecks of your query statements or structures
Add the explain keyword before the select statement. MySQL will set a flag on the query. Executing the query will return the information of the execution plan i ...
Added by cyanblue on Wed, 09 Feb 2022 17:59:09 +0200
Power node mysql after class exercise 34 questions
Database file
https://download.csdn.net/download/yougcave/18897401
Database screenshot
emp employee form
dept Department
salgrade wage scale
1. Name of the person who gets the highest salary in each department
The first step is to find out the maximum salary of each department
select deptno, max(sal) maxsal from emp group by de ...
Added by ggseven on Wed, 09 Feb 2022 13:17:53 +0200