sophia: remake snapshot storage

use special system database to store snapshot metadata