try using sql for defining things