Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for realizing event trigger in OpenGauss database

An event trigger and database technology, applied in the field of relational database management, can solve problems such as the inability to directly implement event triggers

Pending Publication Date: 2022-07-12
BEIJING VASTDATA TECH +1
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] In order to solve the problem that the event trigger cannot be directly implemented in the OpenGauss database, we propose a solution, and for the first time propose a method to implement the event trigger in the OpenGauss database

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for realizing event trigger in OpenGauss database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0060] Embodiment 1: a method for realizing event trigger in OpenGauss database, comprising the following steps:

[0061] S1: Add a metadata table to the OpenGauss database;

[0062] The metadata table is used to cache the meta information of the event trigger, and the metadata table of the event trigger can be used to quickly query the meta information of the event trigger.

[0063] S2: A hash table is built into each thread;

[0064] The hash table is used to store the mapping between the function ID of the event trigger and the function address of the event trigger. Through the hash table, the function address of the corresponding event trigger can be quickly obtained according to the function ID in the thread.

[0065] S3: Manage event triggers, including:

[0066] (1) Perform syntax parsing or semantic analysis on commands, including commands specifying the function body of the event trigger, commands specifying the operation type of the event trigger, and commands spec...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of relational database management, in particular to a method for realizing an event trigger in an OpenGauss database. The method comprises the following steps: adding a metadata table in a database for caching meta information of the event trigger, and setting a hash table in each thread for storing a function ID of the event trigger and mapping of a function address of the event trigger, the step of managing the event triggers comprises the steps of performing grammar analysis on a command, verifying command permission, calling a corresponding management function according to a command type to operate a metadata table and a built-in hash table of a thread, and calling the corresponding event triggers according to different events and operation objects in a query plan execution stage. When an event related to a certain event trigger occurs in the database where the event trigger is located, the event trigger is triggered and executed. According to the method and the device, the problem that an event trigger cannot be realized in an OpenGauss database is solved.

Description

technical field [0001] The invention relates to the technical field of relational database management (RDBMS), in particular to a method for realizing an event trigger in an OpenGauss database. Background technique [0002] Processing a query in a typical relational database management system such as OpenGauss is usually divided into the following three stages: [0003] (1) Lexical syntax analysis, which mainly converts the user's input text (SQL) into an internal data structure, generally called a syntax parse tree, and verifies the correctness of the syntax, and finally obtains a syntax parse tree representing SQL . [0004] (2) Query optimization. The parse tree obtained in the previous stage is optimized based on rules and physical costs to generate an optimal query plan. [0005] (3) Execute the query plan, execute the query plan generated in the previous stage (generally in the form of an iterator), obtain the query result and return it to the user. [0006] Trigger...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/22G06F16/242G06F16/2455G06F16/28
CPCG06F16/2255G06F16/2282G06F16/2433G06F16/2455G06F16/284
Inventor 余鹏何小栋
Owner BEIJING VASTDATA TECH