Category:Other DB
-
Time:2020-6-17
background In this article, I record how to use CTE syntax to query tree structure. In a tree structure, each node can have at most one superior and any number of subordinates. In the actual scene, we will also encounter the query of graph. The biggest difference between graph and tree is that the nodes […]
-
Time:2020-6-16
PostgreSQL is an object relational database management system (ORDBMS) of free software with complete characteristics. It is an object relational database management system based on Postgres, version 4.2 developed by the computer department of the University of California. Many of the leading concepts of Postgres appear in the database of commercial websites only later. PostgreSQL […]
-
Time:2020-6-15
preface Operators are the operational characteristics of database. For the processing of text characters and some label characters, using operators can simplify SQL code, save development time and improve development efficiency. Comparison operator In PostgreSQL, all data types can use the comparison operator, and the comparison operator returns a Boolean value. That is, TRUE or […]
-
Time:2019-12-15
PostgreSQL has a lot of data types that compare with demons. Ltree is one of them. brief introduction Ltree is an extension type of PostgreSQL, http: / / www.sai. MSU. Su / ~ megera…, which is used to solve the data storage of tree structure. See if the plug-in is installed select * from pg_extension […]
-
Time:2019-12-14
When developing database applications or debugging code, you often need to get the current date and time of the system. Let’s take a look at the related functions provided in PostgreSQL. current date CURRENT_DATE The current date function gets the current date of the database server: postgres=# SELECT CURRENT_DATE; current_date ————– 2019-09-28 (1 row) The […]
-
Time:2019-10-6
Preface For a long time, the optimization of fuzzy matching in search has been a headache. Fortunately, powerful PgSQL provides an optimization scheme. Here’s a brief talk about how to optimize fuzzy matching through index. case We have an inspection report form with tens of millions of data. We need to fuzzy search a certain […]
-
Time:2019-6-30
1. Installation Using the following command, the latest version will be installed automatically, which is 9.5 here. sudo apt-get install postgresql When the installation is completed, the default will be: (1) Create a Linux user named “postgres” (2) Create a default database account named “postgres” with no password as the database administrator (3) Create a […]
-
Time:2019-6-29
What is a window function? A window function performs a calculation on a series of table rows that are somewhat related to the current row. This is comparable to the calculation performed by an aggregate function. However, window functions do not aggregate multiple rows into a single output line, which is different from the usual […]
-
Time:2019-6-28
Background of the problem Many developers and testers may encounter a list of data that shows the data on the previous page when it is turned down, that is, there will be duplicate data when it is turned over. How to deal with it? The reason for this problem is that the selected sorting fields […]
-
Time:2019-6-27
abstract One important aspect of relational databases is query speed. The query speed directly affects the quality of a system. Query speed generally needs to peek at the execution process through query planning. The query path chooses the path with the lowest query cost to execute. And how does this cost come out? Parameters and […]
-
Time:2019-6-26
background A common design for dealing with hierarchical structures with uncertain depths, such as organizational structures, is to store IDs and arent_IDs in a table and construct a tree by self-joining. This approach is very friendly to the process of writing data, but the query process becomes relatively complex. Without introducing MPTT model, a node […]
-
Time:2019-6-25
It provides multi-version parallel control, supports almost all SQL components (including subqueries, transaction and user-defined types and functions), and provides a very wide range of (development) language bindings (including C, C++, Java, perl, tcl, and python). This paper introduces its installation process under Windows system. Generally speaking, a modern Unix-compatible platform should be able to […]