Requirement: Data sent by socket, converting String type to object, and then saving Java object to Mysql database.
Create databases and tables
create database imooc_flink;
create table student(
id int(11) NOT NULL AUTO_INCREMENT,
Import mysql dependencies:
Posted on Tue, 01 Oct 2019 13:09:43 -0400 by phpdolan
1. First prepare two tables:
customer (user table) (id, name)
Order (order form) (id, customer_id, price)
There is a one-to-many relationship between the customer table and the order table, which is associated through the customer_id field.
2. Establish the corresponding model files customer.php and order.php.
Posted on Mon, 30 Sep 2019 16:03:27 -0400 by thiggins09
The front-end paging has been used before. In the case of not too much data, the front-end paging is still very convenient. It can also use its own search function. If the amount of data is large, the back-end paging should be used.
The principle of implementation: the front end sends offset and limit (the number of pages displayed) to the bac ...
Posted on Mon, 30 Sep 2019 14:41:23 -0400 by snicolas
I. descriptionMySQL 5.7 version master-slave replication, batch display delay tens of thousands of seconds.
1,io High utilization rate
#iostat -dxm 1 1000
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util
scd0 0.00 0.00 0.00 0.00 0.00 0.00 ...
Posted on Mon, 30 Sep 2019 13:24:28 -0400 by satant
Learning springboot's journey is like snail climbing a mountain, climbing up a little bit, and enjoying the scenery of the journey a little bit.
Continue Last chapter As a programmed ape, sometimes it is inevitable to dig a hole. At this time, you need a log manager (short for Xiao Mi - Hey, you under ...
Posted on Mon, 30 Sep 2019 07:44:35 -0400 by metin
Migration ideaWrite Sql in Drupal 8 environment to check all the data under Drupal 7, and then organize the data structure to call Drupal 8 API to insert the data into Drupal 8 database.
Configure the Database Connection Environment
Modify the set.php file of Drupal 8 site
// Drupal 8 database link
Posted on Mon, 30 Sep 2019 05:34:25 -0400 by fireice87
Learn SQL query well: no other, you are familiar with it.
1. Base table:
Class Schedule Card:
1. Query the information of students whose names contain the word "Hua"
select * from Student where sname like '%China%'
2. Query and count the number of students of the same age
Posted on Sun, 29 Sep 2019 23:42:08 -0400 by Bigun
Recently, when we do a lot of data export and data import, we often encounter the problem of PHP memory overflow. After solving the problem, we summarize some experience and record it in articles.
Optimize the SQL statements, avoid slow queries, reasonably index, query the specified fields, SQL optimization is not ...
Posted on Thu, 26 Sep 2019 05:21:25 -0400 by rodin
In real projects, we usually use the @Transactional annotation to control transactions with Spring. The use of this annotation is very simple. It condenses the tedious transaction control of the original jdbc into the use of this annotation. With the mentality of "knowing what it ...
Posted on Thu, 26 Sep 2019 00:47:35 -0400 by szalinski
Yesterday, I talked to my colleagues about the performance of data tables. Can we use only overlay index to collect data? To test the existing tables in a development environment, we can see that mysql can achieve the requirements of sum by overwriting the index without reading the actual row data through the explain ing command.
However, the ...
Posted on Wed, 25 Sep 2019 04:58:32 -0400 by Morpheus