Object Database - Object-Oriented Database Query

Object-Oriented Database Query

Object oriented databases use SQL query language like notations to express the queries which is called as Object Query Language (OQL). OQL supports all the mandatory features or characteristics of ODBMS to make efficient object database systems. It supports complex data objects, path expressions, operation invocation, inheritance, object extensions for object identity. OQL is a very efficient way of expressing object queries, it keeps object's integrity by using objects implemented methods, rather than its own operations. OQL can also be embedded in other languages like C++, Java,... "OQL is a functional (expression-oriented) language, in which each query is a typed expression (type can be atomic object,collection object, or literal)". OQL doesn't have explicit update operations, like insert, delete to update database. But as an alternative, it can invoke state-altering methods, create, add, and delete, etc., to get similar functions. For example,

Employee (name: ‘‘Ram Sharma", birth date: 11/26/1985, salary: 10000);

creates a new Employee object with necessary attributes data. Like SQL we can write separate function to perform certain task.

  • Polymorphism : OQL supports the polymorphism feature of the object-oriented programming. The various classes can have same attributes and method implementations which are in same hierarchy.

For example, the Employee class has an attribute named activities implemented as an array of Strings. Its subclass Manager also has a method named activities that overrides inheritance of the Employee attribute.

Read more about this topic:  Object Database

Famous quotes containing the word query:

    Such condition of suspended judgment indeed, in its more genial development and under felicitous culture, is but the expectation, the receptivity, of the faithful scholar, determined not to foreclose what is still a question—the “philosophic temper,” in short, for which a survival of query will be still the salt of truth, even in the most absolutely ascertained knowledge.
    Walter Pater (1839–1894)