Everyone is aware of a Data Source that is configured in the container pointing to a database that is then used within the application through a simple data source lookup. For the sake of clarity, this data source will be referred to as Container Data Source. So what is this Logical Data Source? Let us take an example.
Highlightinfo | ||
---|---|---|
| ||
The application is a shopping cart application that provides typical shopping cart functionality to their end customers and for internal customers, it should provide reporting capability on historic data. |
For this application, there will typically be a database user and a Container Data Source configured against this database user for application access. But within the application, there are at the minimum two logical functionality module requiring its own set of data or query modeling – One is the actual shopping cart functionality while the other is its reporting functionality. Initially, the requirement may be to have everything together and have the complete functionality point to the single user. But over period of time and with bigger volumes, there may be a need to move historical data into a separate database and have reporting point to that database. Now the definition of having reporting point to that database effectively means that the entire data access layer logic also should be aware of and point to the database.
...