Code implementation phase

1, Encapsulate database operations: store all database operations in the dao package. (1) using single column pattern to design a tool class for database Connection and provide a Connection object. package dao; import com.mysql.jdbc.jdbc2.optional.MysqlDataSource; import javax.sql.DataSource; impo ...

Posted on Sat, 22 Feb 2020 09:07:01 -0500 by Beyond Reality

jsp to realize simple picture verification code (after login to realize the query database function)

1, Functional analysis of implementation (1) The function of adding the verification code on the landing page plays a certain security role. The login can be realized only when the correct verification code, user name and password are entered. (2) Realize the function of querying database. In the page ...

Posted on Sat, 22 Feb 2020 04:34:39 -0500 by exoduses

Sql Server Proc

CREATE PRoc [Name] { @parameter Data type, @parameter data type OUTPUT[input] } AS begin select INSERT UPDATE (SQL) end --Basic statement fast --These are statement Libraries --Let's see the one without parameters first. It can take parameters or not (I haven't used the one without parameters several times, of course) --Get a table. It fee ...

Posted on Sat, 22 Feb 2020 02:42:30 -0500 by behrk2

Dynamic SQL for Mybatis Series

Contents of this Chapter Differences between #{} and ${} where and if usage of dynamic SQL Use of trim and if in dynamic SQL Use of SQL and include for dynamic SQL Use of select (when, otherwise) for dynamic SQL Use of foreach for dynamic SQL 1. #{} and ${} #{} should be a placeholder fo ...

Posted on Fri, 21 Feb 2020 23:00:16 -0500 by iamtheironman

A simple addition, deletion, modification and query of sprigboot+jpa

Recently, I have taught myself some basic usage of springboot on mooc.com, and I have learned some relevant knowledge on the way to use it. Next, I will write down my learning achievements: This record is a simple addition, deletion, modification and query of mysql database using springboot+jpa. After a ...

Posted on Fri, 21 Feb 2020 05:03:10 -0500 by kyllerj

spark Learning Journey: spark SQL

Article directory 1. Spark SQL overview 2. The relationship and difference of RDD, DataFrame and Dataset in spark 3. Overview of dataframe 3.1. [official api](http://spark.apache.org/docs/2.4.1/sql-getting-started.html) 3.2. Infer Schema by reflection 3.3. Specify Schema directly through StructType ...

Posted on Fri, 21 Feb 2020 04:49:14 -0500 by alohatofu

Take you to read the Mybatis source code construction

Preface Today we will share with you our commonly used persistence layer framework, MyBatis's work principle and source code analysis. Later, we will do some more in-depth explanations about the Mybatis framework. After that, we will put the content in the official account menu bar: serialized. -Framework analysis, welcome to explore! To be hon ...

Posted on Thu, 20 Feb 2020 22:46:56 -0500 by zeddeh

mysql database batch execution sql files for database operations [windows version]

Cause: To upgrade the mysql database in the native test environment, you need to upgrade the database step by step by executing the sql files of the mysql database, so find some articles about mysql to upgrade the sql files needed to upgrade the database in batch. Organize ideas: First, you need to traverse the sql files in the directory where ...

Posted on Thu, 20 Feb 2020 21:19:53 -0500 by Ghostu

Detailed analysis of MySQL execution plan and cost model

background In order to facilitate subsequent communication, a ** Stack-Java Technology Exchange Group ** was created in the morning of 2020,213, which also facilitates active participation by scanning QR codes. If the QR code is out of date, you can add the mini-signal (lastpass4u) of the stack culture-assistant and let him pull you into the g ...

Posted on Thu, 20 Feb 2020 20:16:45 -0500 by curlious

Spring datajpa multi table joint query

It is believed that everyone has used jpa. After jpa inherits the interface of CrudRepository and PagingAndSortingRepository, in simple single table query, jpa can use jpql query quickly, no matter using its own findAll(), saveAll and other methods or using jpa's method naming Specification. However, in ...

Posted on Thu, 20 Feb 2020 02:20:04 -0500 by john8675309