Check out example codes for "localhost magento 2 installation redirects to the live server". It will help you in understanding the concepts better.

Code Example 1

SELECT * FROM `core_config_data` WHERE `path` LIKE 'web/%/%url'

Learn ReactJs, React Native from akashmittal.com