A linguistic database is a collection of texts where sentences and words are annotated with linguistic information, such as part of speech, morphology, and syntactic sentence structure. While early linguistic databases focused on word annotations, and later also on parse-trees of sentences (so-called treebanks), the recent years have seen a growing interest in richly annotated corpora of historic texts that include not only syntactic annotations but further complex annotations, such as alignments between related text layers. This raises the issue of efficiently querying such complex structured linguistic databases. We present a generic approach for defining domain-specific query languages that we use in developing a query language for rich...