The database holds all of your posts and most settings except for a few which is in includes/config.inc.php. So yes you need to keep it where it is.
Do you have a backup of your files?
If you do just upload them to where they used to be. and it should be fine without doing anything else.