PPL, OQL & oodbms

21
Persistent programming language & OQL & OODBMS - Ramandeep kaur brar -M.tech 2 nd sem - 16003

Transcript of PPL, OQL & oodbms

Page 1: PPL, OQL & oodbms

Persistent programming language & OQL & OODBMS- Ramandeep kaur brar

-M.tech 2nd sem- 16003

Page 2: PPL, OQL & oodbms
Page 3: PPL, OQL & oodbms
Page 4: PPL, OQL & oodbms

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.

Page 5: PPL, OQL & oodbms

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.

Page 6: PPL, OQL & oodbms

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

Page 7: PPL, OQL & oodbms

Types in OQL Declaring types for objectsBasic 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))

Page 8: PPL, OQL & oodbms

Select-From-Where in OQL

(simple) Example: SELECT s.name FROM Movies m, m.stars s WHERE m.title = “Sleepless in Seattle”

Page 9: PPL, OQL & oodbms

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.

Page 10: PPL, OQL & oodbms

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.

Page 11: PPL, OQL & oodbms

These layers are…..

• Interaction layer • Application layer• Administration Layer • Security layer• Virtual layer• Paging layer

Page 12: PPL, OQL & oodbms

……

Page 13: PPL, OQL & oodbms

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.

Page 14: PPL, OQL & oodbms

Application layer

• The application is the second layer in this model.

Page 15: PPL, OQL & oodbms

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.

Page 16: PPL, OQL & oodbms

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.

Page 17: PPL, OQL & oodbms

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.

Page 18: PPL, OQL & oodbms

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.

Page 19: PPL, OQL & oodbms

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.

Page 20: PPL, OQL & oodbms

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

Page 21: PPL, OQL & oodbms

Thank you