replaced OldDatabase with IDatabase