basic algorithms of skyline query