A query language for the O 2 object-oriented databases