Mybatis learning - dynamic SQL

Mybatis learning - dynamic SQL What is dynamic SQL Dynamic SQL is to generate different SQL statements according to different conditions Dynamic SQL is similar to JSTL or any text processor based on XML like languages. In previous versions of MyBatis, it took time to understand a large number of elements. With the powerful expression base ...

Added by bocasz on Sat, 26 Feb 2022 05:19:31 +0200

Database and table creation

catalogue 1, Three paradigms of database 1. First paradigm (ensure that each column remains atomic) 2. Second normal form (ensure that every column in the table is related to the primary key) 3. The third paradigm (ensure that each column is directly related to the primary key column, not indirectly) 2, Tablespace 1. Relationship with c ...

Added by pieai on Sat, 26 Feb 2022 04:17:22 +0200

Advanced part of SQL question brushing series

Addition, deletion and modification SQL1 insert record (I) In fact, through the output, we can know the value of the inserted data. insert into exam_record values ( null, 1001, 9001, '2021-09-01 22:11:12', '2021-09-01 23:01:12', 90 ), ( null, 1002, 9002, '2021-09-04 07:01:02', null, null ); You can also use interval to ad ...

Added by Eratimus on Fri, 25 Feb 2022 18:41:17 +0200

Common basic problem sets and notes of SQL database

catalogue object Problem set: --01 list the names of all departments with at least 3 employees --02 list all employees whose salary is more than 'SMITH'. A sub query is used here (that is, the sub query of SMITH's salary) --03 list the names of all employees and their immediate supervisors --04 list employees whose employment date is earl ...

Added by swatisonee on Fri, 25 Feb 2022 11:30:32 +0200

Chapter 7 single line function

Chapter 7 single line function 1. Understanding of function 1.1 what is a function Function runs through the use of computer language. What is the role of function? It can encapsulate the code we often use and call it directly when necessary. This not only improves the code efficiency, but also improves the maintainability. In SQL, we can al ...

Added by Grego on Thu, 24 Feb 2022 13:28:08 +0200

Summary of MOOC Database and System Principles

Experimental questions Basic Operation of Experiment 3 Database (1) Create a database textbook: CREATE database textbook (2) Display and modify the maximum number of connections show variables like "max_connections"; set global max connections = 8; (3) Delete the database textbook drop database textbook Experiment 4 Definition and Mo ...

Added by blackcode on Wed, 23 Feb 2022 19:05:02 +0200

#{} how to prevent SQL injection? What is its underlying principle?

1, The difference between ${} and #{} in MyBatis 1.1 ${} and #{} presentations Database data: dao interface: List<User> findByUsername(String username); List<User> findByUsername2(String username); Mapper.xml: <!-- use#{} --> <select id="findByUsername" parameterType="java.lang.String" resultType="com.lscl.entity ...

Added by samuraitux on Mon, 21 Feb 2022 08:00:16 +0200

Mysql index principle and slow query optimization

background MySQL has become the first choice for most companies with low-cost and rich Internet resources. Although the performance is excellent, how to better use the so-called "good horse with good saddle" has become a compulsory course for development engineers. We often see requirements such as "proficient in MySQL", &q ...

Added by marms on Mon, 21 Feb 2022 06:53:35 +0200

JDBC and database connection pool: SQL injection Pretreatment Batch processing Druids Apache-DBUtils

JDBC overview Basic introduction Simulate JDBC public class TestJdbc { public static void main(String[] args) { JdbcInterface jdbcInterface = new MysqlJdbcImpl(); //Complete the operation of mysql jdbcInterface.getConnection(); jdbcInterface.crud(); jdbcInterface.close(); } } //jdbc interfa ...

Added by christillis on Sun, 20 Feb 2022 21:13:28 +0200

The connection query of MySQL learning notes (this article only introduces the connection query of SQL 92 standard in detail) uses where for connection query

Connection query (this article only introduces the connection query of SQL 92 standard in detail) 1, Meaning and classification of connection query meaning: Also known as multi table query, join query will be used when the query fields come from multiple tables Cartesian product phenomenon: Suppose that table 1 has m rows, table 2 has n ...

Added by deljhp on Sun, 20 Feb 2022 10:54:30 +0200