I am trying the db4o object databse and so far I quite like what I am seeing, but I also read this post on stackoverflow db4o experiences? indicating that not everything that seems so easy is easy.
Right now, I have some questions regarding on how db4o is used in real world apps. So if you have any experience in working (especially in web app context) with db4o, I would love to hear them.
Here are my questions:
How do you manage object identity when working with db4o stored objects?**
Coming from RDBMS background where you normally always have a primary key / identity column for every table, I cant imagine right now on how to manage object identity in db4o.For example, if I was working with NHibernate / mysql and needed to find a User object by id, I would do session.Load(primaryKey) and it will be retrieved by its PK. It is also very common that the PK is defined as auto increment in the table definition.
As there is no such option in db4o, my thought was using a Guid struct in order to identify some objects in the object database.
Any tools to view the stored objects in the db?
Is there something like SQL Server Management Studio (probably less sophisticated) in the db4o world? I would like to view the already stored data / objects in the db file.
Are you screwed when renaming your domain objects?
As far as I know when you rename a class, any previously stored instances in the db cannot be retrieved anymore. Is there a way to work around this issue? How do you deal with updates against a live database which already contains many objects?
Can I exclude properties from being saved to the DB?
If for example one domain object holds a reference to a (stateless) service object, then the service object will also be persisted if the domain object gets persisted, right?
It seems a bit odd to have a service instace saved in the database, at least to me.
Can you exclude the service instance from being saved? If the domain object is retrieved again, how can I make sure that the service is also injected in the instance again?