How do you do data management tasks in a Db4o Object Database?
Asked Answered
D

1

2

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

Danziger answered 19/11, 2008 at 4:28 Comment(0)
C
2

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.

Crossfertilization answered 6/2, 2009 at 9:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.