low-level implementation for sql maps.

plus convenience single-field relationship attributes.