Implementation of Jasmine System
user
Data management
Object management
application
knowledge base
1
,
Jasmine
System overall structure
Jasmine is a hierarchical system consisting of a data management subsystem and an object management subsystem. The data management system is used to pay efficient storage and access to the subject. The data management system provides an operating interface for nested relationships, tuples, and pages, which is an extended XRDB of relational databases. and
Object management system is this scalable number
According to the library system, object models and language are connected
The mouth, the language interface includes the language compiler,
Perform a long-term support library, language interpreter.
What I want to introduce is object management
Subsystem.
2, object storage structure
Storage structure of class and instance in Jasmine
Different, the conversion of the object to the relationship is through the system
Completed, information about the conversion is also stored in the class.
(1), by using the relationship to store examples
According to the instance of the tuple and the domain of the domain, all instances of the reference class itself are stored in the relationship. Multi-value attributes are stored in a multi-value domain, which is the simplest form of nested relationships. Alternatively, the multi-value attribute will cause additional overhead by separating the relationship. We store an instance of a super-class self-instance and superclass subclass in the separation relationship. If we instantiate or release a class's own instance, we don't have to modify anywhere in its superclass or subclass, so that we can modify the object efficiently.
Fixed strings and numbers are stored in a sufficient domain, and the bell strings and numbers are stored in the growth domain. For reference properties, we only store the object flag number (OID) in a sufficient domain, which implements complex objects of non-clustered polycation. Non-clustered complex objects are required for CAD applications, and complex objects in CAD applications are created upward, so that component objects can be reused. Of course, the user can logically enforce the integrity of complex objects to non-clustered complex objects. Specific implementation can instantiate each component object through an instantiation method of the entire object, or increase the "befor" Demon to destroy each component object. In the properties, as a relationship object, we fully use the nested relationship, associate the relationship objects with the internal nested relationships and their internal relational domain properties. Corresponding, component objects of relational objects are not possible to exist from their overall objects. Cluster aggregation complex objects are implemented by relational objects, logically and physically managed in unit form.
The OID attribute is associated with a domain, but the attributes and general attributes of this class are not stored in the instance relationship, which is to increase the efficiency of space. A OID consists of a knowledge base ID number, a category number, and an instance ID number, and the OID can pass alone to the knowledge base and class information alone. According to the user's description, the system selects to store instances in the queue, B tree and hash relationship.
(2), use the relationship to store the class
Because Class is an instance of CLASS, we store all Classes in a relationship, which helps effectively access the class object. However, the class has a heterogeneous structure, so we must design a model to effectively store the class object in a relationship. At all, we have a class object associated with a tuple. Attribute classification, such as enumeration and process properties, which is common to all classes, and attributes have a set of fixed sides (Facet), and we store enumeration and process properties in different internal relationships and FACET in the internal relational domain.
3, more gathering access support
Bounded for collection access and single-value access, it is compiled with early binding and reduces the cost of execution, however, an interactive query requires an interpreter to process instead of a compiler. The Jasmine compiler is implemented with a C compiler, and the application written in Jasmine / C is precompiled into a C program, and the generated C program is compiled and linked on the execution period support library. Pretreatment is used to achieve the optimal lightweight and Code optimization purposes of the C compiler.
application
Precompiled
C procedure
C compiler and link
Permit support library target code
(Compilation)
Jasmine
Target code
knowledge base
Jasmine
User query
knowledge base
(Execution) (interpreter)
The application is translated into C procedures in three phases, which is: query graph generation, access scheme generation, and code generation. In the first phase, from the user query to generate a query map, and the query graph is converted to a more efficient query map based on the use of the user-defined object model. The second phase generates a series of relationship calculations and an optimal solution according to the query graph, this phase uses the rule base optimization technology, and the last phase C code is generated in the C compiler.
(1), querying the map generation
This stage refers to the object model, and the query map is associated with the user query. This query picture is a submap of an object model. This object model is annotated. Object and condition information. At this stage, user queries containing incomplete knowledge access are converted to a more efficient form. In Jasmine, the user forms a query according to the specific generic class rather than this specific class. Depending on the principle of classification, the user can use the condition to embody a non-leaf node class, and if a given condition matches some of the categorized conditions, the non-leaf node class is particularly embodied as a component member that meets the classification condition.
(2), access scheme generation
This stage is translated into object operations in direct mode. The translation rules are built on the basis of query semantics. By using object model information such as map of statistics, access methods, classes to relationships, object operational algorithm is transformed into extended relationship operations. Object expressions are different, depending on whether it contains process properties.
4, single-value access and object buffer
Like a collection of access, single-value access access is also compiled into a C program, which requires a connection period support library when compiling.
When an object is accessed for the first time, the object to the page buffer will be removed from the secondary memory. This object is buffered in the active object table (AOT). In fact, AOT is an internal hash table. AOT has an OID key and entrance. The inlet contains a pointer TID and several update flags that point to the internal instance structure. The internal structure of an instance is similar to a tuple, which makes it easy to refer to other objects and modifications. When an event ends, an object with an update flag is transferred from the AOT to the page buffer and the secondary memory. The user can control the conflict processing in AOT by illustrating the AOT size. To more efficiently store space, the object can be removed from the AOT, but the OID group and the TID group are still removed from the database, and these objects have been lost from memory. We translate single-value access object expressions into AOT-based access. For example, an object expression Obj.attr variable OBJ has a pointer of AOT. First, check the update flag of the AOT entry, if the flag indicates that this object has been deleted, an error occurs. If an object is cleared from memory to manage space, then this object will be removed from the secondary memory through the TID. In other cases, the system will take ATTR from the internal instance structure pointed to by the AOT pointer, and the object expression returns this value. If this attribute domain contains a reference object, it is another OID. The system finds an object with this OID through the hash table in AOT. If not, look for the OID or TID to the secondary memory stored in AOT. The value of such an object expression is a gate pointer to the reference object, which will become the value of the Attr property. General object expression obj.attr-1. quittr-N is recursive. The object variable has a pointer to the inlet of the AOT, not an OID that is delayed. Since the Hash-based search is avoided, the object access speed is improved. This is good for connection-based access, such as hypermedia applications.
In general, the buffer and object access mode are directly related. The page buffer has a structure that is suitable for different instances of the same class. AOT, the object buffer has access to access structures for different classes. Advanced applications, for example, CADs have both modes. Just need a double buffer policy, including page buffering and object buffering, not just a single buffer policy, which will contain unnecessary objects and reduce memory utilization. However, the double buffer method makes the same object in different formats simultaneously in different buffers, so we have to maintain internal consistency of two objects of the same entity. 5, interpreter
The system provides a compiler for the efficient operation of the program, providing an unproductor for the application's rapid development and processing of special queries. The compiler translates query statements into extended relational operators. The interpreter translates the query statement into an extended operator and executes. Considering practicality, the interpreter can only perform a collection of collected access, and the result of the query is sent to a collection variable referenced by a compiled program. Users can use interpreters and compiled programs in an integrated environment. Since the programs are in an example, they can interview with each other in a query. The program can activate each other, compiler, and interpreter sharing code, interpreter compilation analysis input query statement. The interpreter uses the function provided by the runtime support library to generate an intermediate code.
This article describes a Knowledge Base Management System KBMS - Jasmine, focusing on the object management subsystem.