A Method for modeling Finite State Machines in technological processes using SQL
Vladimir A. Kholopov, Mark M. Klyagin, Roman M. Ogorelcev
MIREA – Russian technological university
This paper explores the application of SQL for modeling finite state machines in the management of technological processes. Finite state machines, as a mathematical model, are widely used for automating sequential operations and managing complex systems. Here, a method is proposed in which the relational data model serves as the foundation for implementing a finite state machine, and SQL is used to define the transition logic between states through tables and triggers. The article discusses the design of state and transition tables, where each state is characterized by attributes such as timestamp and status, and transitions are defined by conditions and events that trigger state changes. Triggers created in the MySQL database environment automate the system’s logic, enabling state transitions when specified conditions are met, thereby implementing the model without the need for additional external software. The proposed solution is flexible and scalable, simplifying the addition of new states and transitions, as well as adapting the system to evolving requirements. The use of SQL and the relational model also facilitates integration with other analytical tools, enabling data collection and analysis for process optimization. This SQL-based approach to finite state machine modeling in a relational database makes the control system for technological processes more efficient, easy to maintain, and conducive to further analysis, which is particularly relevant in modern automated production environments.
Finite State Machine, technological process, relational data model, Finite State Machine state, Finite State Machine modeling