updated database to name keys after fields instead of constraints