get the database involved.