## 4 The Proposed CIM-Oriented Ontology Database Framework for DMS
### The Procedure of Topology Processing Using an Ontology Database  
Figure 15 represents a subset of the lineage models stored in the ODB, with data for 'Terminal4' and 'Switch4964' represented as 'S', 'P', and 'O'. RDF triples can be represented in the form of an RDF graph, as shown in Figure 15, where the subject and object nodes are merged. The Terminal with the mRID '53002901066' includes not only the attribute name, which belongs to the Terminal class called 'Terminal4', but also correlations with the Switch having mRID '10992901066'. Unlike an RDB, an ODB includes correlations between components within the data itself, allowing straightforward exploration of hierarchical topologies. Figure 14: An example of generating a payload using an interface schema. Figure 15: Joining RDF triples. If an ODB is utilized, correlations between components of the power distribution system can be stored in the RDF structure, facilitating TP. The ODB can be implemented as an RDF triple store or a GDB. RDF triple store involves storing data by structuring RDB tables into RDF triples (S-P-O). A GDB, however, is a type of no-SQL database that stores RDF nodes in a graph format. An RDF triple store allows index searching, treating all the S, P, and O as primary keys. Utilizing these characteristics facilitates data indexing and efficient exploration. Each RDF triple possesses a unique address, enabling swift retrieval of desired data stored in the database through triple indexing. Therefore, the RDF triple store is advantageous for TP, and the time complexity of the RDF triple store in terms of TP can be expressed as Equation (2). This equation indicates the extent to which the processing time of topology increases relative to the amount of data given. As the number of nodes increases, the speed of TP becomes significantly faster compared to an RDB. By utilizing an RDF triple store, it is possible to efficiently process and explore large-scale RDF data. Equation (2) theoretically represents the time complexity of topology processing using an RDF triple store, which leverages the advantages of structured triple indexing. This equation is derived based on the assumption that each element--subject (S), predicate (P), and object (O)--is treated as a primary key in the triple-based index structure. \[O(h_{RDF})=O(n\log_{2}n) \tag{2}\]  
Table 4 shows examples of RDF triples stored in an RDF triple store. Figure 16 illustrates TP using the RDF triple store, based on the example presented in Table 4. As shown in Figure 16, the initial search involves querying records where 'S', 'P', and 'O' are '0', 'Terminal.ConductingEquipment', and '1', respectively. Subsequently, the next step entails searching for records where 'S' is '1' to establish a topology connection. This involves searching for records where 'S' equals '1' and 'O' equals '2'. This process is iterated by searching for records where 'S' equals '2'. Since S-P-Os are all treated as primary keys, they can be efficiently processed using an index search. Figure 16: Topology processing using an RDF triple store. A GDB stores data in an RDF graph structure, allowing direct connections between data elements. A GDB is a database well suitable for handling complex operations using graph theory. It utilizes index-free adjacency, allowing swift node traversal without the necessity for index searches. Since the data are directly connected in a graph structure, the speed of TP is significantly faster. This structure allows for a clear representation of relationships between data and facilitates easy comprehension of complex relationships. In the RDF graph structure, each node represents an entity, and each edge represents a relationship between entities. Through this data structure, it is possible to explore connected nodes starting from a specific node. By exploring each node and its connected nodes, one can efficiently and rapidly find the desired information. Equation (3) describes the optimal traversal performance of a GDB, which is based on index-free adjacency.