The expressive power of query languages based on logic programming