DATABASE TECHNOLOGY GROUP UNION - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

DATABASE TECHNOLOGY GROUP UNION

Description:

Object is user defined complex data types, which is has structure or state ... [3] Versant used by Chicago Stock Exchange [4] Gemstone [5] Ontos [6] DB/Explorer ODBMS ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 48
Provided by: perdanaFs
Category:

less

Transcript and Presenter's Notes

Title: DATABASE TECHNOLOGY GROUP UNION


1
DATABASE TECHNOLOGY GROUP UNION
  • ROSNITA BINTI ABDUL RAHMAN WGA060029
  • FATIMAH RANI BINTI SAHUL HAMEED WGA060047
  • FATIMAH ZAHARA BINTI TAHIR WGA060022
  • JULIANA BINTI MOHD. MISNAN WGA060030
  • NOORIL IZZUWA MOHD ALWI WGA060051
  • FATHIA BINTI MOHAMED WGA060021

2
OUTLINE
  • Introduction
  • What is object based database
  • Definition of Object
  • Defination Object based database
  • What is ODBMS
  • Impact to real wold
  • Analysis
  • Object based database features
  • Advantages and disadvantages of OODBMS
  • Object query Language
  • SQl vs OQL
  • Design
  • Implementation
  • Evaluation
  • Conclusion

3
INTRODUCTION
Object Based Database
4
What is object based database?
Figure 1.0 Overview of Object based database
5
Definition of Object
  • Object is user defined complex data types, which
    is has structure or state (variables) and
    methods.
  • An object is described by four characteristics
    such as
  • Identifier a system-wide unique id for an object
  • Name an object may also have a unique name is
    database (optional)
  • Lifetime determines if the objects is persistent
    or transient
  • Structure construction of objects using type
    constructor

6
Definition Object based database
  • is a database in which information is represented
    in the form of object.
  • Object-oriented databases are specialized engines
    designed specifically to store objects
  • An object based database system must satisfy two
    criteria
  • it should be a DBMS, and
  • it should be an object-oriented system
  • Introduced to face the challenges in the Internet
    and Web applications.

7
What is ODBMS
  • ODBMS is a database management system (DBMS) that
    supports the modeling and creation of data as
    objects.
  • allow for the storage of complex data structures.
  • can handle very complex data
  • provide the high-performance dictated by
    interactive systems.

8
What is ODBMS
  • Important Language is Data Definition and
    Manipulation Language (DDML)
  • Benefits
  • - Object - Oriented
  • - Not depend on the application
  • - Data types can be extended to support
    complex data
  • - Improvement in data access performance

9
Object Structure
  • complex object may be constructed from other
    objects by using certain type constructors.
  • It can be represented by (i,c,v)
  • i is an unique id
  • c is a type constructor
  • v is the object state (current values)
  • Constructors consist
  • basic types
  • atom, tuple and set
  • collection type
  • list, bag and array

10
Impact to real world
  • ODBMS provide lowest cost for development
  • Best performance combination when using objects.
  • stores exactly the same object model that is
    used at the application level
  • Savings in development time by not having to
    worry about separate data models.
  • There are many application that use object based
    database such as pagers, voicemail, online flight
    booking and PCS phone
  • Industries rely on ODBMS
  • Medicine
  • Multi media
  • High-energy physics

11
Example on OODBMS
  • 1 ObjectStore used by SouthWest
    Airlines Home Gaye
  • 2 InterSystems' Cachè ODBMS used by Ajou
    University Medical Center in South Korea
  • 3 Versant used by Chicago Stock Exchange
  • 4 Gemstone
  • 5 Ontos
  • 6 DB/Explorer ODBMS
  • 7 Oracle

12
ANALYSIS
  • Object based database features
  • Advantages and disadvantages of OODBMS
  • Object query Language
  • SQl vs OQL

13
Object Based Database Features
  • Applications are specified and developed at the
    logical level
  • Ability to navigate along the paths of the
    logical data model across the database.
  • Can include not only primitive (atomic) data
    values, but also abstract objects representing
    entities in the real world and intangible
    concepts.
  • Support aggregation classification, instantiation
    and inheritance .
  • All information in a database is described using
    the same object model.
  • Database object can be active as well as passive
  • Exhibit behavior such inter-object
    message-passing paradigm, or abstract data
    type encapsulation

14
How to connect OBD with programming
  • iimport org.odmg.
  • import java.util.Collection
  • Implementation impl new com.vendor.odmg.Impleme
    ntation()
  • Database db impl.newDatabase()
  • Transaction txn impl.newTransaction()
  • try
  • db.open("addressDB", Database.OPEN_READ_WRITE
    )
  • txn.begin()
  • // perform query
  • OQLQuery query new OQLQuery(
  • "select x from Person x where x.name
    \"Doug Barry\"")
  • Collection result (Collection)
    query.execute()
  • Iterator iter result.iterator()
  • // iterate over the results
  • while ( iter.hasNext() )
  • Person person (Person) iter.next()
  • // do some addition processing on the
    person (now shown)
  • // now traverse to the address object
    and update its value

15
ADVANTAGES VS DISADVANTAGES OF ODBMS
16
Object Query Language (OQL)
  • Declarative query language
  • Not computationally complete
  • Syntax based on SQL (select, from, where)
  • Additional flexibility (queries with user defined
    operators and types)

17
Example
  • The following is a sample query
  • what are the names of the student?
  • Select distinct FName.name
  • From student_detail
  • Where student.program computer science
  • Valid in both SQL and OQL, but results are
  • different.

18
OQL vs SQL
19
OQL vs SQL
  • OQL
  • Statement queries an object database
  • Returns
  • Object
  • collection of objects.
  • SQL
  • Statement queries a relational database
  • Returns
  • Tuple
  • tables

20
DESIGN
  • Complex Object
  • Object Identity
  • Classes
  • Attribute
  • Method
  • Encapsulation
  • Inheritance
  • Nested table

21
Object Relationship Diagram
Figure 2.0 Object relationship diagram
22
Complex Object
  • Complex object are unique.
  • Its also contains object such as integers,
    characters, byte strings of any length, Boolean
    and floats.
  • Example Figure 2.0
  • create type Name as Object
  • (FName varchar (20),
  • LName varchar(20)
  • )
  • /
  • Note the slash at the end, needed to get Oracle
    to process the type definition.

23
  • Object identity
  • Which is unique identifier of particular object
    and the identifier are system generate.
  • Class
  • A class defines the data values stored by, and
    the functionality associated with, an object of
    that class. (figure 3.0)
  • Attributes
  • Represent data components that make up the
    content of a class. (figure 4.0)
  • Methods
  • It represents the functional component of a class
    and describes how an object operates upon its
    attributes and how it interacts with other
    related objects. (figure 5.0)

24
  • Encapsulation
  • Provides a logical data independence.
  • There are two views of encapsulation
  • The programming language view
  • Database adaptation
  • Inheritance
  • Allows one class to incorporate the attributes
    and behaviors at one or more other classes.
  • Example Based on figure 2.0, class Student and
    Teacher(child) are inherited from class
    Person(parent class)
  • Nested table
  • A more powerful use of object types in Oracle is
    the fact that the type of column can be a table
    type.

25
Classes
Figure 3.0 Class and Subclass
26
Attributes
Person (name, address, phoneNo,idNumber,dateOfBirt
h)
Figure 4.0 Object Attributes
27
Method
  • create type student as (
  • name Name
  • address Address
  • phoneNo PhoneNo
  • program varchar (20)
  • department varchar (20)
  • cgpa number (1,2))
  • not final
  • method ageOnDate (onDate date)
  • return interval year
  • create instance method ageOnDate (onDate date)
  • return interval year
  • for student
  • begin
  • return onDate-self.dateOfBirth
  • end

Figure 5.0 Methods
28
Nested Tables
  • CREATE TYPE Contact AS TABLE OF AddressCREATE
    TABLE Person (      name   Name,      mailing
    Contact)      NESTED TABLE mailing STORE AS
    MailingTable

Figure 6.0 Nested table
Notes The above relations that represent
individual Person are not stored directly as
values of the mailing attribute.
Rather, they are stored in a single table, whose
name is declared as MailingTable to store
the relations of type Contact.
29
User defined Data Types
  • Creating a row type
  • Example
  • create row type AddressType(
  • street char(50),
  • city char(20)
  • postcode number(5))
  • create row type personalType(
  • name char(30),
  • address AddressType)

30
Creating Data Types
  • Creating Table
  • create table student_detail
  • of Student
  • create table teacher_detail of Teacher

31
IMPLEMENTATION
Step by step how to create the Object based
database for Student
32
EVALUATION
33
COMPARISON BETWEEN RDBMS AND OODBMS
34
COMPARISON BETWEEN RDBMS AND OODBMS
35
CONCLUSION
36
CONCLUSION
  • In order to implement ODBMS, the user should
    consider the following factor which is
  • Business need
  • High performance
  • Complex data

37
Implementation Result
a) Syntax to create type name as object
38
Implementation Result
b) Syntax to create type address as object
39
Implementation Result
c) Syntax to create type phoneno as object
40
Implementation Result
d) Syntax to create type Person as object

41
Implementation Result
e) Syntax to create type Student

42
Implementation Result
f) Syntax to create type Teacher

43
Implementation Result
g) Syntax to create table student_detail

44
Implementation Result
h) Syntax to create table teacher_detail

45
Implementation Result
i) Syntax to insert value into table
student_detail

46
Implementation Result
j) Syntax to show the value of student_detail


47
Implementation Result
k) Syntax to update table student_detail

Write a Comment
User Comments (0)
About PowerShow.com