def idIsPresent(self, instanceId):
        cu = self.db.cursor()
        cu.execute("SELECT isPresent FROM Instances WHERE "
                        "instanceId=?", instanceId)

        val = cu.fetchone()
        if not val:
            return 0

        return val[0]