Okay, assume you have an index.php, that "includes" the database connection file.
Your index.php would have the following:
Your database connection file would have (should be at the top of the file):
if (!is_defined('ACCEPTABLE')) exit;
Since index.php has defined ACCEPTABLE, the include for database_connection will complete.
If you had another page, let's call it article.php, that DOES NOT define the ACCEPTABLE constant and tries to include the database connection file, the database connection file will exist at the IF check and not load the entire file (so the database connection won't be available to article.php.
I'm not sure what WEB_ROOT is used for, but you'd only "have" to move your database connection file outside of your httpdocs, although it doesn't hurt to move anything that is used in an include (everything, except your index.php, articles.php -- which are web facing files).