create slice of database and tables from mysql select