QDEF and Its Approximations in OBDM