I think you might be misunderstanding things a bit.
To start with, it doesn't really matter where the actual DB files are stored on your localhost because you would never need to manipulate them directly. (If you really are curious though, they're in the xampp\mysql\data\ folder in Windows.)
Instead, you should always use some sort of interface application, like phpMyAdmin, to manage and edit your DBs. By using phpMyAdmin, you can also easily import and export databases.
In terms of the Web root folder, the one thing that you should probably place outside of it is the PHP file that calls the mysqli_connect function to connect to the DBs. Larry talks a lot about this in his book, so if you follow his advice, you should be fine.
I've migrated from my localhost to a Web hosting server many times, and in terms of the DB, things are pretty simple. All you have to do is export the DB from your localhost and then import it from the interface your Web hosting company provides.
More specifically, from phpMyAdmin on your localhost, there is an Export tab you can use. Simply select the DB or tables you want to export, and then click the Export button. By default, the exported file will be a .sql file, which should be fine.
To import the database, you first need to access the version of phpMyAdmin your hosting service provides for you. The tricky thing is that a lot of hosting services block the Import tab in phpMyAdmin, but luckily, there's an easy workaround. .sql files can be opened in text editors. If you open a .sql file in a text file (which might take a second if the DB is big), you'll see that all it is is a bunch of INSERT statements (and a few other statements) for recreating the DB from scratch.
As such, all you have to do is copy all the text in the .sql file, click on the SQL tab in phpMyAdmin, paste all of the SQL code in the text area, hit OK, wait a second, and BOOM! you have your entire DB on your hosting service.
That's about it.
Let us know if you have any other questions.