Condensed database code