Abstract: Yet Another Next Generation (YANG) is a data modeling language which is primarily designed to define the hierarchical struc⁃ ture of data used in network configuration management protocols such as NETCONF. However, traditional relational databases struggle to maintain optimal index performance for YANG data, and it is challenging to ensure data validity and transaction characteristics, particu⁃ larly in resource-constrained environments such as network base stations. In this paper, we introduce the design and implementation of DB4YANG, an embedded database optimized for minimal resource usage while effectively handling and storing YANG model data . DB4YANG supports fast read and write operations on YANG data and ensures data integrity through continuous synchronization with opti⁃ mistic locking. This approach mitigates the performance drawbacks that arise from non-native processing and format conversions com⁃ monly found in relational databases. Furthermore, this paper delves into transaction processing techniques tailored for YANG model data. These techniques are designed to ensure the reliability and consistency of data operations and strictly adhere to the Atomicity , Consis⁃ tency, Isolation, and Durability (ACID) principles to preserve data integrity. We conducted several experiments comparing DB4YANG with an existing database, and the results demonstrate the effectiveness and efficiency of the proposed database.
Keywords: YANG; embedded database; high-performance index; data consistency