If you already have constructed your database with older versions of DEX but want to move to the new 4.7 version, you do not have to rebuild your database but back it up in your current version and restore it afterwards with DEX newest version.
To backup the database is as quick as doing this:
// Open the database
DexConfig cfg = new DexConfig();
Dex dex = new Dex(cfg);
Database db = dex.Open("HelloDex.dex", false);
Session sess = db.NewSession();
Graph g = sess.GetGraph();
// Save a backup
g.Backup("HelloDex.backup");
// Close the database
sess.Close();
db.Close();
dex.Close();
And then to restore it you have to:
// Restore the backup
dex = new Dex(cfg);
db = dex.Restore("HelloDex.dex", "HelloDex.backup");
sess = db.NewSession();
g = sess.GetGraph();
// The database is open again, but the object identifiers may have changed.