Spring DATA JPA: create entity classes
JAVA 8
Spring Boot 2.5.3
MySQL 5.7.21
---
Note: this code uses org.projectlombok:lombok (the version is specified by Spring Boot).
catalogue
1. Create entity class
2. Primary key id
3. Composite primary key
4. General field
4.1. Use @ Column annotation
4.2. Do not use @ Column annotation
4.3 enumeration type
4.4. Creation time and last upda ...
Posted by ntg on Fri, 29 Oct 2021 20:47:27 -0700
Mysql5.7(Linux) installation tutorial - package installation
I failed to install Mysql on Linux for many times, which was very painful. So I wrote a Mysql installation tutorial at night, hoping to avoid detours in the installation!
1, Package installation
1, First, prepare a clean Linux server, which should be emphasized here. Don't miss the Bug
[root@VM-0-2-centos ...
Posted by jigen7 on Fri, 29 Oct 2021 19:03:57 -0700
Join query & & aggregate function of Mysql
join query
MySQL connection query usually combines the record rows from two or more tables to splice data based on the common fields between these tables. First, determine a main table as the result set, and then selectively connect the rows of other tables to the selected main table result set. Connection queries that are frequently used ...
Posted by ignace on Fri, 29 Oct 2021 16:43:50 -0700
Function storage of MySQL high-level statements
1, Database function
1. Mathematical function
The records stored in the database often need a series of arithmetic operations, so MySQL supports many mathematical functions.
Common mathematical functions
Mathematical functiondescribeabs (x)Returns the absolute value of x; The absolute value is always positive, and the absolute value o ...
Posted by UKlee on Fri, 29 Oct 2021 06:54:35 -0700
MySQL full backup and recovery
introduction
With the rapid development of office automation and e-commerce, enterprises rely more and more on information system. Database, as the core of information system, plays an important role. Database backup is an important means to recover important data in time and prevent data loss in case of data loss. A reasonable database ...
Posted by Hayce on Fri, 29 Oct 2021 06:46:24 -0700
Mysql various locking mechanisms
1, Introduction to mysql lock
Lock source
When there are concurrent operations, a mechanism is necessary to ensure the integrity and consistency of data. Lock is the realization of this technology.
Lock type
According to the concept, it is divided into pessimistic lock and optimistic lock
According to particle size: Table lock, page ...
Posted by nelsok on Fri, 29 Oct 2021 02:11:40 -0700
Build records of problems encountered in native hadoop and cdh
hadoop startup error ERROR: Cannot set priority of datanode process
The cluster was not formatted
./bin/hdfs namenode -format
Modify yarn default port After that, it needs to be restarted because it is not hot
database Error reporting 1045
[root@test ~]# systemctl stop mariadb ##Close mysql
[root@test ~]# mysqld_safe --skip-grant-tables ...
Posted by dcooper on Thu, 28 Oct 2021 23:28:19 -0700
MySql database Basics
MySql database is a relational database MySQL database is not case sensitive
Some grammars in this article, such as goudan, dachui and Cuihua, are not fixed grammars and can be named arbitrarily
data typeintegerint(m) m indicates the lengthLong integerbigint(m)Floating point numberdouble(m,d) m represents the total length d and the decimal po ...
Posted by Randomizer on Thu, 28 Oct 2021 20:03:13 -0700
JDBC and DBUtils tools
JDBC and DBUtils tools
What is JDBC?
In Web development, it is inevitable to use database to store and manage data. In order to provide support for database access in Java language, SUN company provided a set of standard Java class library for database access, namely JDBC, in 1996
The full name of JDBC is Java Database Connectivity, which is ...
Posted by Kathy on Thu, 28 Oct 2021 12:38:58 -0700
6000 words summarizes the most basic addition, deletion, query and modification commands of MySQL
CRUD is what we often call addition, deletion, query and modification. It is also the most basic operation of the database C: create add R: retrieve find U: update modification D: Delete delete
Comment: in SQL - indicates a comment, which needs to be on a single line, or use comment comment.
1, Create
Let's create a student table first ...
Posted by Sakesaru on Wed, 27 Oct 2021 16:38:03 -0700