database manager script