ONTOS formerly VBase - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

ONTOS formerly VBase

Description:

GemStone from Servio Corporation, based on SMALLTALK. ONTOS from Ontos,Inc., based on C . ... Example: GemStone (extends SMALLTALK) ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 30
Provided by: sond9
Category:

less

Transcript and Presenter's Notes

Title: ONTOS formerly VBase


1
ONTOS ( formerly VBase)
  • Presentation - class CSCI 397C
  • Student Son Doan
  • Date November 11, 1999

2
ONTOS (formerly VBase)
  • Introduction
  • What is ONTOS (formerly VBase)?
  • Basic Architecture of ONTOS Applications
  • Setup a Working Database Using DBATool
  • Accessing Persistent Objects
  • Metaschema
  • Transaction control
  • Object SQL

3
Introduction
  • GemStone from Servio Corporation, based on
    SMALLTALK.
  • ONTOS from Ontos,Inc., based on C.
  • O2 from O2 Technology,based on O2C.
  • ObjectStore, based on C.
  • Objectivity/DB, based on C.
  • Versant, based on C.

4
Approaches for OO DBMSs
  • Extend a programming language. Example GemStone
    (extends SMALLTALK)
  • Extend a data model such as relational data model
    with object-oriented features. Example Oracle,
    IBM DB2
  • Provide extendible object-oriented DBMS
    libraries. Example ONTOS

5
What is ONTOS?
  • A commercial product of Ontos of Billerica,
    Massachussettes
  • Based on making C into a database programming
    language
  • Provides a persistent object store for C
  • Activate and deactivate objects
  • Handle concurrency
  • Incorporate ObjectSQL

6
ONTOS Client-Server Architecture
  • Application Process
  • Virtual Application
    code
  • Memory

  • Client
  • Local Area Network

7
ONTOS Client-Server Architecture (cont.)
  • Local Area Network
  • Database Primary Secondary
  • Registry Server Server
  • File System File
    System
  • Distributed
    database

8
ONTOS object database
  • A distributed database and based on the
    client/server architecture for data interaction.
  • The server side manages the data store
  • The client side provides the interface to user
    processes and manages the mapping of data to the
    application process virtual memory space.

9
Large data-intensive applications
  • 3 major components of the integrated object
    system
  • The kernel database
  • meta-schema
  • basic functionality.
  • The class libraries and the header files
  • The utility programs

10
Setup a Working Database Using DBATool
  • cd ltdirgt
  • cp /usr/local/ONTOS/ONTOSDB/db/OntosSchema
    myKernel
  • DBATool
  • gtgt register kernel tutorialKern on lthostgt at
    ltdirgt/myKernel
  • gtgt register database tutorialDB with kernel
    tutorialKern
  • gtgt quit

11
Accessing Persistent Objects
  • Naming of Objects
  • Activation of Persistent Objects
  • Deactivation of Persistent Objects
  • Deletion of Objects

12
Naming of Objects
  • The name of an object can serve as an entry point
    to the database.
  • The name of an object is typically set in the
    constructor.
  • Name is an inherited attribute from the root
    class Object.

13
Naming of Objects (Example)
  • class Thing public Object
  • private
  • int priv_value
  • public
  • Thing(int aValue, char theName)
  • int getValue()
  • void setValue()

14
Naming of Objects (Example)
  • // Constructor
  • ThingThing(int aValue, char theName) Object
    ( theName )
  • priv_value aValue
  • A Thing can then be created as follows
  • myThing new Thing(someValue,
    myFavoriteThing)

15
Access a persistent object
  • ONTOSs class Object provides the function
    OC_lookup() to access a particular object in the
    database
  • Example
  • Thing myThing (Thing)OC_lookup(myFavorit
    eThing)

16
Activation of Persistent Objects
  • Activation initiates transferring the objects
    state from the database to main-memory and
    transforming references.
  • A single object using OC_lookup().
  • All objects contained in an Aggregate using
    OC_getCluster()
  • All objects reachable from a particular object
    using OC_getClosure().

17
Activation of Persistent Objects
  • Object OC_lookup ( char objectName, LockType
    lock readLock, )
  • Object OC_getCluster ( char clusterName,
    LockType lock readLock, )
  • Object OC_getClosure ( char objectName, LockType
    lock readLock, )

18
Deactivation of Persistent Objects
  • An object is deactivated with the operation
    void ObjectputObject()
  • An entire Aggregation is deactivated with void
    AggregateputCluster()
  • Implicitly achieved by deleting with
  • void ObjectdeleteObject()
  • void ObjectdeleteCluster()

19
Metaschema
  • Metaschema provides the underlying support that
    allows a form of access called programmatic
    access to database.
  • Metaschema classes include
  • Type
  • PropertyType
  • PropertyIterator

20
Metaschema (Example)
  • Type the ThingType (Type) OC_lookup ( Thing
    )
  • Type propertyType (Type) OC_lookup (
    Thingpriv_value )
  • PropertyIterator propIter new PropertyIterator
    ( theThingType )
  • while ( propIter-gtmoreData() )
  • // get result with operator() function

21
Compare OntosDB with C
  • OntosDB C
  • Type class
  • Property data member
  • Procedure member function
  • Supertype base class
  • Subtype derived class

22
Transaction Control
  • In a database with many concurrent users,
    conflict between users must be resolved.
  • Atomicity of change
  • Transaction data pool
  • 3 kinds of transactions
  • Basic transactions
  • Nesting transactions
  • Shared transactions

23
Basic Transactions
  • 3 graduations for locking objects read lock,
    write lock, or no lock.
  • The interface to the transaction mechanism
    consists of 3 functions
  • TransactionStart
  • TransactionCommit
  • TransactionAbort

24
Nesting Transactions
  • Transaction may be nested (i.e., multiple
    TransactionStart calls without intervening
    commits or aborts are activated).
  • Nested transactions make long transactions more
    practical. A single long transaction can be
    divided into a series of many small nested
    transactions.

25
Shared Transactions
  • Cooperating processes can share a single
    transaction.
  • The first process to issue a TransactionStart
    call initiates the transaction. Subsequent
    processes issuing a TransactionStart call with
    the same name simply join it.
  • A shared transaction may be thought of as one in
    which the transaction data pool is visible to all
    processes participating.

26
ObjectSQL
  • The interface of the two incompatible systems C
    and Ontos utilizes QueryIterator class.
  • Begin with OC_startQuerySession()
  • End with OC_endQuerySession().

27
ObjectSQL (Example)
  • OC_startQuerySession()
  • QueryIterator myQuery
  • myIter new QueryIterator((select from Thing
    where getValue() 100))
  • while(myIter-gtmoreData())
  • // get each Thing and process it somehow
  • delete myIter
  • OC_endQuerySession()

28
ObjectSQL (cont.)
  • The resulting collection of objects satisfying
    the SQL query can be obtained by using
    QueryIteratormoreData().
  • To get each object of the result collection, use
    QueryIteratorYieldRow()
  • Example
  • ArgumentList anArgList myIter-gtYieldRow()
  • Entity ptr (Entity ) (anArgList)0

29
References
  • Alfons Kemper. Object-Oriented Database
    Management. Prentice Hall, New Jersey, 1994.
  • George Wilkie. Object-Oriented Software
    Engineering. Addison-Wesley, 1993.
  • R.G.G. Cattell. Object Data Management.
    Addison-Wesley, 1991.
  • James A. Larson. Database Directions. Prentice
    Hall, New Jersey, 1995.
  • Setrag Khoshafian, Razmik Abnous. Object
    Orientation. John Wiley Sons, Inc., 1995.
  • A.A van Rossum. URL http//is.twi.tudelft.nl/data
    bases/1996/ontos/report/ontos.html
Write a Comment
User Comments (0)
About PowerShow.com