tags:

views:

228

answers:

1

I'm new to OODBMS systems, but I'm using Db4o on a new project for which it's perfectly suited. Things are going great and I really like the concept, but I'm struggling with how to do basic data management tasks associated with development. Periodically I want to wipe out all of a certain Type in the DB, how do I do this without actually writing a method in code to do it and then running my app? Also, how do I address "schema" changes. If I change the definition of a particular class, does Db4o create a new "table" for it, or does it recognize it as the same Type with just a different set of members?

Btw...I'm in .NET 3.5

+2  A: 

I usually write development code for as long as I need it (until the application can handle those problems itself). You'll be happy to know that ObjectManager is now free so you might want' to check it out http://developer.db4o.com/blogs/product_news/archive/2009/01/25/object-manager-enterprise-now-free-to-all-developers.aspx

Schema changes should be addressed by adding default values to new fields. Db4o will not "create a new table" for it but simply "add a new column". The object you retrieve from db after you change your class definition will have the new property but it will be null - so it is a good idea to add a default value to it. This way all your objects will sort themselves on first use. Removed fields will be ignored.

Goran