A framework for comparing type systems for database programming languages