Database-lookup, data-entry and cross-referencing program (SQL/Python)