当前位置:网站首页>Trigger for gbase 8s
Trigger for gbase 8s
2022-06-25 04:32:00 【Eight delicacies tofu】
trigger (Trigger) Is a special stored procedure . On the watch INSERT、DELETE or UPDATE In operation , Some triggers can be defined to make the database server automatically call stored procedures or SQL sentence . Triggers maintain the consistency of logically related data in different tables , Maintain the relevant integrity of the data .
Triggers can also be used to enforce referential integrity , To add to multiple tables 、 When a row is updated or deleted , Retain the relationships defined between these tables . However , The best way to enforce referential integrity is to define primary and foreign key constraints in related tables . If you use a database diagram , You can create relationships between tables to automatically create foreign key constraints .
Triggers are sometimes called events - Conditions - Action rules (Event-Condition-Action Role,ECA The rules ).
A trigger consists of three parts :
(1) event : It refers to the insertion into the database 、 Delete 、 Modification and other operations . When an event declared by the database programmer occurs , Trigger starts working .
(2) Conditions : When the trigger is activated by an event , Not immediately , Instead, the trigger tests the trigger condition first . If the condition holds , Then the trigger executes the corresponding action , Otherwise the trigger does nothing .
(3) action : If the trigger meets the predefined conditions , Then the action associated with the trigger (Action) Executed by the database management system . These actions can prevent events from happening ( I.e. cancellation event , For example, delete the tuple just inserted ), It can be a series of database operations , It can even be related to other operations that have nothing to do with triggering events .
边栏推荐
- mysql的tinyint字段类型判断的疑惑
- 如何筛选出和产品相关的词,精准排除掉无效词
- Laravel document sorting 10. Request life cycle
- 【Kubernetes系列】Helm的安装使用
- kenlm
- Detailed explanation of flex attributes in flex layout
- 讲座记录《惯性导航的新应用——惯性测量》
- Lecture record: history and development of strapdown inertial navigation solution
- 【LeetCode】148. Sort linked list
- GBASE 8s的并行操作问题场景描述
猜你喜欢

What is the storage engine and the three common database storage engines for MySQL

Intel 13th generation core showed its true colors for the first time: 68mb cache improved significantly

Finereport displays and hides column data according to conditions

讲座记录《惯性导航的新应用——惯性测量》
![LeetCode 剑指Offer II 091 粉刷房子[动态规划] HERODING的LeetCode之路](/img/ad/69fce7cf064479a0ddd477fb935de2.png)
LeetCode 剑指Offer II 091 粉刷房子[动态规划] HERODING的LeetCode之路

Nodejs 通过Heidisql连接mysql出现ER_BAD_DB_ERROR: Unknown database 'my_db_books'

How to draw an industry investment map

NFT insider 63: the sandbox reached a cooperation with Time magazine, and YGG established Spain's subdao

讲座记录《多种空间大地测量技术的数据处理方法和应用》

Finereport (sail soft) handling the problem that the histogram data label is blocked
随机推荐
Anaconda安装+TensorFlow安装+Keras安装+numpy安装(包含镜像和版本信息兼容问题)
"Renaissance" in the digital age? The bottom digital collection makes people happy and sad
OBS Browser+浏览器的基本使用
Failed to install redis interface
GBASE 8s的多线程结构
Win10 environment phpstudy2016 startup failure record
GbASE 8s中的Blob 页(Blobspace page)
kenlm
NFT insider 63: the sandbox reached a cooperation with Time magazine, and YGG established Spain's subdao
Lecture record: data processing methods and applications of various spatial geodetic techniques
Upgrade cmake
Numpy NP tips: squeeze and other processing of numpy arrays
2020.3.3 notes async/await and promise and Then processes and threads
cnpm : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本。
GBASE 8s存储过程语法结构
1280_ C language to find the average value of two unsigned integer
Laravel document sorting 7. View
How much do you know about the use value of WMS warehouse management system
关于TCP连接三次握手的详细总结
Finereport displays and hides column data according to conditions