Modified DB interface to allow IDs == 0.