[#1213] Adding individual metadata table, SQL to calculate, and hookups to Entity model