How Do Object Databases Store Methods?Source: comp.databases.object
Problem: Objects have both state (data) and behavior (methods). Object databases (ODBs) store the objects' data in a repository on a server. But where are the methods stored? And if they are invoked, are they executed on the client or on the server?
Joshua Duhl explained:
In general: it varies by ODBMS -- however all C++ ODBMSs have the methods in the client application and no methods execute on the server. Other languages, eg. Java or Smalltalk may execute on the server. [...]
In C++ the method execution occurs entirely on the client. This may be surprising to you, but let me dispell a common misunderstanding about C++ based object databases -- the state of the object is stored in the database but the method code is not. This split may seem contrary to the notion of storing the "object" in the database, but there are some practical issues that your question really is getting at. One issue is the fact that C++ is a compiled language and executing it in a distributed manner introduces some compiler/environment/platform heterogeneity issues that are difficult to solve. It is possible that the ODBMSs could support executing C++ method code on the server, but that also creates issues with keeping the client and server applications in sync. So the vendors have chosen not to store the method code in the server and only execute methods on the client.
Now with Java and Smalltalk, it is more possible and likely that the entire object will be stored in the database and the execution of the methods can be on either the client or server as the method code could be shipped across and executed on any platform (because both Java and Smalltalk are currently interpreted, virtual-machine based languages).
POET Software, Why Use an ODBMS?
Versant Object Technology, Myths About Object Databases
Barry & Associates, Object DB articles