A Natural Language Object Database Model

This example uses analysis and interpretation of natural language to demonstrate the differences between the object and relational model. This example should also suffice to show that implementation in an object database is superior to a relational database for the following reasons.

  1. The object model results in much less code.

  2. The object model allows inclusion of a lot of relational based application code into the object database itself.

  3. Many of the required structural tricks required for relational databases are inherent within the object database. This means some things which require extra entities in relational databases are catered for by the structure of the object model automatically, ie. some things which required design and programming in a relational database are no longer required in an object database. Therefore an object model requires less work.

  4. As a result less code and less work results in more speed and fewer bugs.

Object Database Model

Using an object database model makes this task much more simple than it would be if using a relational database model. In an object database different methods can be attached to differing, specialised object types. These specialised object types would be new classes with specialised methods. These new classes would be defined in terms of the Report Class shown below. The new classes would effectively be inherited implementations of the Report Class. An object database is extremely capable of implementing such a structure and the object-inherent method processing required.

Rules can be included in the form of methods.

One rule could be to change the sentence constructor to produce different prepositions based on whether the first letter in a noun is a vowel or not. Another could control tenses and contain descriptions of verb conjugations in another class in order to produce the correct tenses. The possibilities are immense.

Natural Language - The Relational Model