Tag:Table building

  • Netease face to face (30 minutes)

    Time:2021-6-28

    Netease face to face (30 minutes) Self introduction, project introduction Introduce spring, IOC and AOP The implementation of AOP and the dynamic proxy are introduced in detail Set, HashMap, expansion mechanism Implementation of synchronized in JVM Lock lock process Deadlock, the scene describes the deadlock situation Garbage collection, accessibility analysis Creating tables with MySQL The […]

  • Quick construction of crud restful API interface with gin + Gorm + router

    Time:2021-6-10

    According to the previous article“Gorm Foundation“Encapsulating crud API interface” Download extension go get github.com/go-sql-driver/mysql go get github.com/jinzhu/gorm go get github.com/gin-gonic/gin Table building statement CREATE TABLE `users` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `username` varchar(255) CHARACTER SET latin1 DEFAULT NULL, `password` varchar(255) CHARACTER SET latin1 DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; structure […]

  • MySQL large data paging optimization

    Time:2021-6-10

    Reference article: Paging query method and its optimization for millions of data in MySQL MySQL paging query optimization     The key points are as follows: In the process of optimizing paging statements, you must pay attention to adding sorting fields to the query statements, and you must create your own tables. Some of them […]

  • What are libraries, tables and super tables? How to use it? Data modeling of tdengine

    Time:2021-6-3

    The second video tutorial is to quickly sort out the abstract concepts in tdengine and learn to plan the data model in the production scene. clicklink, get a video tutorial. Welcome to the data world of the Internet of things In the typical scene of Internet of things, there are many different types of acquisition […]

  • Goblog learning 4

    Time:2021-5-4

    database Standard librarydatabase/sqlThe interface and specification of database operation, such as connection pool management, data binding, transaction processing, have been encapsulated in. But for the concretedatabaseThe type needs to be driven by a third party, ifmysql sqliteAnd so on. load Var DB * sql.db / / declare database operation variablesFunc initdb() {} / / initialization […]

  • A solution to the problem that configuration annotation in springboot JPA Oracle entity class cannot generate annotation in database

    Time:2021-5-3

    demand aboutoracleDatabase,jpaOfEntityEven if comments are [email protected] (columndefinition =’column comment ‘), unable to generate comments for columns in the database tier Solution User defined annotation, configured inEntityClass, when the project is initialized, theEntityManagerGet all the entity classes, traverse whether the annotation is configured in the entity class, if so, dynamically spliceDDLStatement and execute Custom annotation: import […]

  • The most special index primary key of MySQL

    Time:2021-5-2

    We are used to assigning a primary key to the table and setting the primary key to grow automatically when creating a table. This is basically a habit, at least I have this habit. But why do we develop this habit and what is the basis for it? For a long time, I was hearsay […]

  • MySQL query stored procedure view trigger function index table building statement database version current login user current database name

    Time:2021-4-16

    MySQL query stored procedure view trigger function index table building statement database version current login user current database name   INFORMATION_SCHEMA.TABLES INFORMATION_SCHEMA.TABLESMySQL is a built-in (regarded as) information database, which stores the information of other databases maintained by MySQL server.INFORMATION_SCHEMA.TABLESThere are several read-only tables, which are actually views, not basic tables, so you can’t see […]

  • Add, delete, modify and query database by springboot + MySQL

    Time:2021-4-6

    1. Directory structure: 2、 pom.xml File: <?xml version=”1.0″ encoding=”UTF-8″?> <project xmlns=”http://maven.apache.org/POM/4.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd”> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.3.RELEASE</version> <relativePath/> <!– lookup parent from repository –> </parent> <groupId>com.leyou.demo</groupId> <artifactId>user-service-demo</artifactId> <version>0.0.1-SNAPSHOT</version> <name>user-service-demo</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> […]

  • Common statements of MySQL date

    Time:2021-1-13

    data type datetime timestamp Statement testing Table building DROP TABLE IF EXISTS test_time; CREATE TABLE test_time ( `id` INT (3) UNSIGNED AUTO_INCREMENT, `Name ` char (5) default ‘// used for update time test `test_datetime` datetime DEFAULT CURRENT_TIMESTAMP, `test_datetime1` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `test_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `test_timestamp1` timestamp NOT NULL DEFAULT […]

  • Range partition

    Time:2020-12-6

    Series articles: Range partition MySQL execution plan The partition method of range partition table is: each partition contains row data, and the partition expression is within the given range. The range of partition should be continuous and can not overlap, which can be defined by the values less than operator. Create common table 1 CREATE […]

  • All parsing of external, terminated, partitioned and stored in the table creation statement of hive

    Time:2020-11-27

    Starting from the statement of creating tables on the official website, my analysis is as follows: `CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS] [db_name.]table_name    — (Note: TEMPORARY available in Hive“0.14“.“0“and later)` `[(col_name data_type [column_constraint_specification] [COMMENT col_comment], … [constraint_specification])]` `[COMMENT table_comment]` `[PARTITIONED BY (col_name data_type [COMMENT col_comment], …)]` `[CLUSTERED BY (col_name, col_name, …) [SORTED BY (col_name […]