This comes up periodically and there has been no satisfactory answer found. A lot of people simply delete the DB files and let OH start over periodically, dealing with any errors in the brief period where the DB is empty.
Personally, a database like db4o should only be used as a last resort. By this I mean it should only be used for those Items where you need very accurate (i.e. not averaged like rrd4j does to older data) for long periods of time or non-numeric data. Items for which you only need numeric historic data in the recent past (last week) rrd4j should be used. For Items where persistence is only needed for restoreOnStartup use MapDB.
I’ve outlined a good approach to achieve this with groups here:
NOTE: 500 MB is not really that large for a DB.