Misc DB-related scripts.

Change-Id: I94bfa5a7297440146cb36898579c6f380769a5c2