Gemstone
Gemstone
t
t
p
:
/
/
c
s
e
t
u
b
e
.
t
k
/
Network Software
GEM Process GEM Process
STONE Process
VMS File I/O
Database
LAN VAX
delivers the data management capabilities performing disk I/O, concurrency control, recovery
and authorization.
Stone uses unique object id called object-oriented pointers (OOPs) to refer to objects, and an
object table to map an OOP to a physical location. The Gem process runs either on the
server or on a client. It comprises compilation facilities, browsing capabilities, and user
authentication.
2.4.2 Object model
The GemStone object model is very closely related to the Smalltalk-80 model.
The three principal concepts of the GemStone model and language are object, message,
and class. All the objects in GemStone are made persistent.
2.4.2.1 Classes
Every GemStone object is an instance of exactly one class. Objects with the same internal
structure and methods are grouped together into a class and are called instances if the class.
2.4.2.2 Objects
An object is a chunk of private memory with a public interface. Internally, most objects are
divided into fields called instance variables. Each instance variable can hold a value, which is
another object. Objects communicate with other objects by passing messages. Object is the
root of all super/subclass hierarchy.
Figure 3 GemStone Architecture
The GemStone system exhibits client/server architecture, and is distributed over two
processes: the Gem and the Stone processes. The Stone process, running on the server,
2.4.1 Architecture
The GemStone data management system, developed at Servio Logic, was one of the first
and simplest commercial OODBMS products. It is based on Smalltalk, with very few
extensions. GemStone merges object-oriented language concepts with those of database
systems. And provides an object-oriented database language called OPAL which is used for
data definition, data manipulation and general computation.
2.4 GemStone
http://csetube.weebly.com/
GEMSTONE - Notes
h
t
t
p
:
/
/
c
s
e
t
u
b
e
.
t
k
/
Object
SequenceableColletion
Collection
Bag (NSC)
String Array Set
method
sender
message
receiver
o1 o2
selector
2.4.2.4 Methods
The methods are the concrete implementations that can be invoked by a message sent to an
instance. An object can only responds to a message if it contains a method with a selector
that matches the message format. Methods are provided to query and manipulate the
internal structure.
2.4.3 Collection classes
In GemStone, a class defines the structure of its instances, but rarely keeps track of all the
instances. Instead, collection objects Arrays, Bags, sets can store groups of instances
not necessarily of the same type in indexable or anonymous storage slots. GemStone
provides built-in support for managing collections of objects by the pre-defined Collection
class and its subclasses.
Array: like String, is a subclass of Collections subclass SequenceableColletion.
Bags and Sets: are non-sequenceable Collections, in which instance variables are
anonymous. They do not maintain any order on their elements. The difference between a
Bag and a Set is that the instances of Bag may contain the same object several times,
whereas a Set contains an element just once even though it might have been inserted
several times
Figure 5 Class hierarchy of Collection classes
Figure 4 Message passing in GemStone
In GemStone, all actions are invoked by message passing. Messages are requests for the
receiving object to change its state or return a result. The set of messages an object
responds to is called protocol (its public interface). An object may be inspected or changed
only through its protocol. The basic form of all message expressions is <receiver>
<message>. The <receiver> part is an identifier or expression denoting an object that
receives and interprets the message. The <message> part gives the selector of the message
and possible arguments to the message.
2.4.2.3 Messages
http://csetube.weebly.com/
GEMSTONE - Notes
h
t
t
p
:
/
/
c
s
e
t
u
b
e
.
t
k
/
OODBS RDBS
object tuple
instance variable column, attribute
class hierarchy database scheme (is-a relation)
collection class relation
OID key
message procedure call
method procedure body
The correspondence between object-oriented and relational database systems
Note that this correspondence table is only an approximate equivalence. The properties in
OODBS are actually not applicable in RDBS and vice versa.
2.5.2 Comparison
Although there are great advantages of using an OODBMS over an RDBMS, some
disadvantages do exist. The following table shows the advantages and disadvantages using
OODBS over RDBS.
Advantage Disadvantage
Complex objects & relations
Class hierarchy
No impedance mismatch
No primary keys
One data model
High performance on certain tasks
Less programming effort because of
inheritance, re-use and extensibility of
code
Schema change (creating, updating) is
non trivial, it involves a system wide
recompile.
Lack of agreed upon standard
Lack of universal query language
Lack of Ad-Hoc query
Language dependence: tied to a specific
language
Dont support a lot of concurrent users
Advantages and disadvantages using OODBS over RDBS
Because of the existing disadvantages of using OODBS, the approach of ORDBMS has
become popular. In the future, it is likely that we will see the continued presence of OODBMS
that address the needs of specialized market and the continued prominence of ORDBMSs
that address the needs of traditional commercial markets.
The following chapter specifies the indexing design issues and its implementation in
GemStone.
To have an idea about OODBS, the table shows the correspondence between object-
oriented and relational database systems:
2.5.1 Correspondence between OODBS and RDBS
2.5 Comparisons of OODBS & RDBS
http://csetube.weebly.com/
GEMSTONE - Notes