Joomla is made of two ‘things’.
The raw files/folders where exist under a directory, and the database. The files are the actual php coding program (the site) that make the work and the database is where the data are stored. The coding know about the existing of the database in file configuration.php
So you might have the files in one locations (host) and the database to another, or the same host. One database can also serve two or more Joomla sites. The difference lies in db prefix. The fields in configuration.php that tell the site where to save are the follow:
- host - That is the host. If in same host it will be localhost, or an IP in another host
- db name, user, password (self explanatory)
- db prefix - That is how within the same database you can serve two or more sites. It’s a unique identifier where each Joomla site tables name start