Started to use flags to indicate database traits

e.g. sqlite does not support right outer join
Added more database traits