Object Query Language (OQL) is a newer version of Structured Query Language (SQL) that has been build upon the newer type of Database Management System (DBMS). Traditionally SQL databases were written upon what has become referred to as Relational Database Management System (RDBMS). This system deployed a technique of relating data records to one another by using an incremental counter and joining all records that have the same header value, for example the SQL statement "Select * From OrderBody Where HeaderID = X" would create a temporary table of the selected records and this was done by either searching all records within the OrderBody table or by maintaining an B+-Tree index on the HeaderID field.
Traditional Relational Design
Traditionally databases have been designed with the relational model. This would separate data over several tables and use a common identifier to relate all the child records back to their parent. These model was based on each row within the table containing individual pieces of data. SQL databases based on this design would create joins that would reconnect the entire relation back together, suffering performance limitations.
Object Database Design
In the object database design, in stead of using multiple tables to store a data object, it is stored in one a single record. This keeps the entire object intact and reducing the need to join the data back together. This process of storing the entire object in one table reduces the total amount to lock, reads and write operations required. It is also this ability to store an object in one record that reduce the amount of file reads and writes, which enables the object design to maintain efficiency with very large and very complex database designs.
In the newer OQL databases, they are based upon an Object Orientated Database Management System (ODBMS), which have the added ability of referring directly to objects within the database by a persisted ObjectID that is guaranteed never to change value, for as long as the object is held within the table. This then gives the OQL database the ability to execute the same SQL statement as above, but it does so without having to maintain an additional index or having to read in every record within the table, as the data is now designed in a manner that can be read in order one efficiency (O(1)). So the speed of an OQL database is not impacted by the growth or size of the database as it is when based upon SQL.
The difference in the languages between both OQL and SQL is very slight, with the only really obvious difference is within the "where" section of the OQL statements, for example, a normal OQL statement may read "Select Street, Suburb, Postcode From Users, Addresses where Users.UserName = 'Me' and Users.AddressID = Adresses.ID"
Download ObjectDatabase++ SDK
Try today by freely downloading ObjectDatabase++ and its SDK & GUI Editor.