A database language for CC