Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to distinguish mysql events from transactions

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

How can mysql events be distinguished from transactions? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.

How to distinguish mysql events from transactions

1. Event

Events (event) in MySQL are used to perform scheduled or periodic tasks. Events are managed by a specific thread, the so-called event scheduler, but events cannot be called directly.

MySQL creation event

CREATE [DEFINER = {user | CURRENT_USER}] EVENT [IF NOT EXISTS] event_name ON SCHEDULE schedule [ON COMPLETION [NOT] PRESERVE] [ENABLE | DISABLE | DISABLE ON SLAVE] [COMMENT 'comment'] DO event_body; schedule: AT timestamp [+ INTERVAL interval]. | EVERY interval [STARTS timestamp [+ INTERVAL interval].] [ENDS timestamp [+ INTERVAL interval]...] Interval: quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE | WEEK | SECOND | YEAR_MONTH | DAY_MINUTE | DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}

two。 Business

Transactions are mainly used to deal with data with a large amount of operations and high complexity. Transaction processing can be used to maintain the integrity of the database and ensure that batches of SQL statements are either executed or not executed.

Characteristics of MySQL transactions

1. Atomicity: all operations in a transaction are either completed or not completed, and do not end at some point in the middle

two。 Consistency: the integrity of the database is not compromised before the transaction starts and after the transaction ends

3. Isolation: the ability of a database to allow multiple concurrent transactions to read, write and modify its data at the same time

4. Persistence: after the transaction is completed, the modification of the data is permanent, even if the system failure will not be lost.

MySQL is a relational database management system developed by the Swedish company MySQL AB and belongs to the products of Oracle. MySQL is one of the most popular relational database management systems. In the aspect of WEB application, MySQL is one of the best RDBMS (Relational Database Management System) application software. MySQL is a relational database management system in which relational databases store data in different tables instead of all data in one large warehouse, which increases speed and flexibility.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report