4. Overview of OQL
• OQL is an object database query language.
• OQL is being used as an embedded query
language.
• OQL can also be used as a stand-along query
language.
5. Overview of OQL
• OQL is based on SQL. Many queries in SQL are
also valid in OQL.
• OQL also extends SQL to deal with object-
oriented notion.
• The supporting languages are small talk, C++
and java.
• OQL can also invoke operations programmed
in these language.
6. OQL: Object Query Language
SELECT can construct new objects, arbitrary
structures
FROM tuple variables can range over any
collection; may have sub queries.
WHERE pretty much the same as in SQL
7. Types in OQL
Declaring types for objects
Basic types:
Atomic types (e.g., string, integer, …)
Enumeration types (Monday, Tuesday, Wednesday….)
Constructors: can be applied without limitations.
Set: (1, 5, 6)
Bag: (1, 1, 5, 6, 6 )
List: (1, 5, 6, 1, 6 )
Array: Integer[17]
Struct: (name: string, address: string)
struct( name: “John”, childrenAges: bag (1,1,2,2))
9. Other Features of OQL
• Ordering of the results
ORDER BY m.title, m.year.
• Subqueries wherever a collection is appropriate.
• Quantifier expressions:
• FOR ALL x IN S : C(x)
• EXISTS x IN S:C(x)
• Aggregation, grouping and HAVING clauses.
• Set operators: UNION, INTERSECT, EXCEPT (different if
operating on bags or sets).
• Remove duplicates: SELECT DISTINCT.
10. Object oriented database layers
architecture model
This section describes the layers architecture
in object oriented databases. Data are transfer
from database server to client, which passes
through six layers. These six layers have
different responsibility do as per requirement.
The fig 1.1 shows the six layer architecture
model for object oriented data model.
13. Interaction layer
• The interaction layer is first layer of Six Layers
Architecture Model for Object Oriented
Databases.
• In this layer, user can interact with the
databases.
• The user can send the data to databases as
well as data can be retrieved from database to
user.
15. Administrative layer
• This layer is responsible for management of
administrative information.
• This layer can change responsibility as per
requirement.
• strict requirements of the quality system impose
complex data as well as document workflows.
• The success in preserving complex structures like
databases depends crucially on the amount of
information that is lost in the process.
• In this model Administration layer control the flow of
data as well as provide the permission to access the
data.
16. Security layer
• The security layer play important role in this
model.
• The security layer is responsible to provide the
full security to data and also provide to the
security of application used to manage the data
also.
• This layer can provide the authentication to the
uses as well as the authentication to databases
administrators.
• All the security concerned is considered in this
layer. Who can use what type of data.
17. Virtual layer
• The main advantage in this approach is that the
memory requirement of each slice processor is very
small and is independent of input size.
• In this model the virtual layer manage the data
virtually.
• This time the large volume of data are managed.
• The concept of virtual is to put the data outside the
memory.
• As per the requirement the data are converted in real
memory.
• In this ways, the problem to manage large data is
solved.
18. Paging layer
• The paging layer is responsible to divide the
data in the form of pages.
• The pages are managed easily.
• The data are divided into pages as the same
size of page frame; the page frame is that
dividing memory in equal number of
partitions.
• In this way large volume of data can be
managed efficiently.
19. Disadvantages of OODBMS
• Lack of experience-not easy for an end user.
We need programmers to interact.
• Competition-object relational DBMS
(ORDBMS) are much more easier to use and
capable of providing object facility to the end
user.
20. Looking at the object level may
impact the performance
• Complexity- OODBMS concept
implementation is complex.
• Lack of support of views- no support for views
manipulation.
• Lack of support for security
• Poor performance
• Unable to support large scale systems