Logics for Emerging Applications of Databases