add raw SQL class to use

django api cannot handle the problem of foreign key, so we need to do
raw SQL statements