The TableDataManagement class is used as an interface to manipulate data in rows of an SQL database table.
Each object of the class can access individual rows of a given table.
How does it work?
On initalization of a class object it obtains information about the table it is interfacing.
After the initialization the class knows:
- what primary keys are defined
- what are the types of the table columns
After the object has been initialized the user can than either load the object with a specific record, or save a new record into the table.
Benefits
- select, update, save, delete records without having to write specific SQL queries
- Keep code clean by passing all needed data trough to the class object and calling the specific methods