I haven't yet gone through the whole documentation of TOB product.
As far as I understand TOB is like another ORM tool (similar to
Hibernate, db4o, etc..)
What I am looking for is, can TOB be used to read the data from an
underlying database (let's say DB2) and put all of the data in memory.
Assume that the data is going to be static for most of the time.
Now instead of going to DB2 database for the data, I would like to
just query TOB and have the data returned.
In a way, the question is Can TOB act as an In-Memory Database ?
A read-only database ?
I know about the in-memory relational databases, (H2, HSQLDB etc...)
Thanks,
TOB functions very simular to an ORM layer, with subtle differences.
The result is TOB guarantees transaction isolation level up to
SERIALIZABLE, while ORM tools normally persuade you that
READ_COMMITTED is enough, but actually because they are not able to
support higher levels.
Hibernate is an ORM while db4o is an OODB. But they all support
application development with a data model called "Network Model",
while TOB supports "Object-Relation-Kin Model". There are subtle
differences too that make productivity differences.
TOB requires exclusive write access to the underlying db (DB2 not
currently supported, Oracle,Sybase,MySQL,PostgreSQL,HSQL,H2DB is
current list), and existing data and schema in such DBs need a little
porting/refactoring to be read by TOB. After this, you can safely
assume your object graph is all in RAM after got one node of it as an
object reference. TOB doesn't load *all* data into memory, but when
load one object according to your query result, it will load all
related objects to this object, before giving it to you. And if you
have RAM large enough, you can configure TOB to load all data at
startup if you like.
TOB doesn't have options to be *read-only*, but you can reduce its
transaction level by configuration to avoid automatic read locks thus
maximize performance.
Compared to HSQL, H2DB, the major difference to TOB is accessing
interface. With TOB you access data as objects and inter-references
between them, SQL queries only as an auxiliary method. While with the
formers you use SQL with query criteria all the time.
And for the concept of In-Memory databases, like HSQL and H2DB, their
difference compared to TOB is an analogy to operating systems without
swap files/partitions compared to modern ones with that. In-Memory
databases crash when you have a total data size larger than your
memory size. But with TOB, it is like you have virtual memory, so you
can serve more objects than that fit within your physical RAM, but
don't need to be aware that just like modern applications just use
virtual memory blocks.
Hope these explanations help.
Cheers,
Compl