Db4o gives you a simple and straightforward interface to object persistence - ObjectContainer. In .NET versions a conventional name IObjectContainer is used.
ObjectContainer is your db4o database.
c#: IObjectContainer container = Db4oFactory.OpenFile(filename)
VB: Dim container As IObjectContainer = Db4oFactory.OpenFile(filename)
filename is the path to the file, in which you want to store your objects. Normally you should open an ObjectContainer when the application starts and close it, when the session is finished to persist the changes to a physical storage location.
c#: container.Close()
VB: container.Close()
ObjectContainer interface gives you all the basic functionality to work with persistent objects. Normally you can save a new or updated object of any class using ObjectContainer#set(object)
Deletion is done with the following method:
c#: container.Delete(object)
VB: container.Delete(object)
Through ObjectContainer#get and ObjectContainer#query you get access to objects retrieval functionality. The characteristic features of an ObjectContainer are:
Basically ObjectContainer supplies functionality, which is enough for the most common usage of db4o database. Additional features are provided by an interface extending ObjectContainer - ExtObjectContainer.
The idea of splitting basic and advanced functionality between 2 interfaces is:
Every ObjectContainer object is also an ExtObjectContainer. You can cast it to ExtObjectContainer or you can use #ext() method to get to the advanced features.