Added database and table autocreation on first search