web app w awkward database schema