Abstract

Bulk data types such as sets, bags, and lists are an important component of a modern query language. It is desirable that operations on one bulk data type (such as sets) that have analogous counterparts in other bulk data types (such as bags and list) be expressed using the same expression. This kind of uniformity is achieved only to a limited degree in object-oriented languages, as these languages have the type information loss problem. Languages based on parametric polymorphism achieve this uniformity in a much better way, but only upto "bracket-switching." That is, in these languages, a query over bags that is analogous to a query over sets, are identical upto interchanging the set and bag brackets. This paper presents a simple extension to a popular parametric polymorphic type system. We show that it is possible to construct a query language around this type system so that the same expression can be used to implement analogous queries across sets, bags, and lists. Furthermore, this uniformity is achieved without any loss in type information.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call