When database programming is done, we need to create or manipulate or view data stored inside a database. From programming side, we use objects like resultsets and statements to view, edit or create data in the database. These objects are available in many programming languages like Java and provide special facilities for operations for database programming.
One such facility is the ability to provide a data structure which can make it easier to store data values stored in a single record in a database table. This means that the resultset will have the same structure as the database table. A resultset will have same number of columns as the database table. The datatype of each column will also be same as the defined in the database table. The size of data will also be same as the database table. This kind of facility makes it very easy to do any kind of database programming.
So far so good. But what about business logic implementation? How the business logic is implemented in the system and how this business logic implementation is related to these database programming objects like resultsets and statements?
Business logic implementation is in fact separate from database programming. The business logic implementation involves creating objects (from classes) and managing the computations through defining various methods and using the interaction among objects to do all the computation.
Once all this computation is done then the results of these computations need to be passed on to the database. It is exactly at this place that resultsets and statements objects are used.
For beginners, it may not seem obvious but experienced people know how to do database programming.