Create domain from sql table.