Type inference in a database programming language

We extend an ML-like implicit type system to include a number of structures and operations that are common in database programming including sets, labeled records, joins and projections. We then show that the type inference problem of the system is decidable by extending the notion of principal type schemes to include conditions on substitutions. Combined with Milner's polymorphic let constructor, our language also supports type inheritance.