  Reasoning over OWL 2 is a very expensive task in general, and therefore the
W3C identified tractable profiles exhibiting good computational properties.
Ontological reasoning for many fragments of OWL 2 can be reduced to the
evaluation of Datalog queries. This paper surveys some of these compilations,
and in particular the one addressing queries over Horn-$\mathcal{SHIQ}$
knowledge bases and its implementation in DLV2 enanched by a new version of the
Magic Sets algorithm.
