|
Object-oriented database systems were proposed to solve the difficulties encountered in traditional databases, such as deal with complex structures and recursively-defined persistent objects, active database components, and support browsing and complex queries. We will describe a small library in Prolog. This library provides an object- oriented environment which can maintain persistent, complex data components. This environment combines the advantages of both object-oriented concepts and a logic programming language. We call this environment which is about 1200 lines of Prolog code. There are some advantages for this approach. First, the database language in MODEL_OODB is like logic programming; it is a declarative language, so it supports data abstraction. Second, there is an inference engine in Prolog, and the MODEL_OODB has a built-in deductive capability. Third, the performance of Prolog's hashing function is not bad, it is very helpful for doing dynamic binding in MODEL_OODB. In the user environment, MODEL_OODB provides an operation mode which is like that of the UNIX file system. It can easily solve name conflict problems, so it is not confused for its distributed consult files. The distributed consulting of MODEL_OODB uses remote coyp of the remote file into local host. If the user locks the remote file, then no others can update it until it is unlocked. Our locking mechanism uses UNIX shell commands or UNIX remote shell commands. It provides a simple lock mechanism to permit users to be sure that no more than one user are updating the shared data simultaneously.
|