added real SQL support for FYP