Pertemuan 12 The Manipulative part of the object Matakuliah

Download Report

Transcript Pertemuan 12 The Manipulative part of the object Matakuliah

Matakuliah
Tahun
Versi
: M0174/OBJECT ORIENTED DATABASE
: 2005
: 1/0
Pertemuan 12
The Manipulative part of the object
data model (Lanjutan bagian 3)
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Mahasiswa dapat Menjelaskan proses
manipulasi object data model dan
operator-operator yang digunakan dalam
manipulasi tersebut (C2)
2
Outline Materi
•
•
•
•
•
•
•
Choose
Bag
Set
Convert
Nest
Unnest
Construction of new objects using type
names
3
Choose
• Choose
– Is an unary operator which “pick” a single
object (any object) contained in the argument
set object
• Example
Choose From Delivered_Orders
4
Bag
• Bag creates a bag-object which contains a
single specified object
• Example
5
Set
• Set creates a set-object which contains a
single specified object
• Example
6
Convert
• Convert converts a specified bag-object
into a set-object (removing any duplicates
objects), or a specified set-object into a
bag-object
• Example
7
Nest
• Nest operates upon a set-object and
returns a set-object within which the
original information has been re-structured
into a more concise from.
• Example
8
Unnest
• Unnest performs the reverse process
• Example
9
Construction of new objects using type names
• Example
Retail_customers
UNION[customer]
SET(Customer(customer_no:’C2’,name:’Barry’))
10
SUMMARY
• The object algebra also includes operators
to change the type of an object
• Set and bag object can be created using
the SET and BAG operators
• The Convert operator convert a set-object
into a bag-object and a bag-object into a
set-object
11
SUMMARY
• NEST and UNNEST are used to add an
remove structure within an object
• Type names can be used as operators
with which to construct new instances
12