You can reuse the same datasource to connect to different databases in different stages of an application's lifecycle. When you promote/demote an application from one lifecycle stage to another, the system automatically connects the datasource to the database created for the stage.
For example, in a typical development environment, the developers do not have access to production databases. They create datasources to point to dummy databases in the development environment. After the development work is complete, the application is promoted to testing and then production and the same datasource names are used to point to QA or production databases respectively, without changing the application's code.
Let's see how to reuse the same datasource with different values in different lifecycle stages of an application. If you haven't created an application yet, follow the steps in Create an Application from Scratch.