Selecting database before creating tables