The database row data models provide storage of data until the data is inserted and perform error checking on the data as it is added to the row data model and prior to the insertion into the database. The base class for each database row data model is the DataTableItemBaseModelDataTableItemBaseModel class.
The CDataTableModelCDataTableModel is the base class for all database table classes. It
contains aggregations of the DbColumnParameterDataDbColumnParameterData and SqlCmdParameterSqlCmdParameter
classes. The purpose of the DbColumnParameterDataDbColumnParameterData class is to provide
necessary information for each column in a database table. The purpose of the
SqlCmdParameterSqlCmdParameter class is to provide information about every parameter in a
stored procedure call. The three dictionaries in each CDataTableModelCDataTableModel provide
quick look up for the SqlCmdParameterSqlCmdParameter aggregations based on 3 different naming
schemes, the common name within the application, the column name in the
database table and the parameter name in the stored procedure. This file
contains almost all the calls to stored procedure. Each class that inherits
from this class defines the names of the tables and the stored procedures.
This allows for generic SQL database calls.
Each instance of a database table row model references its data table model to acquire the DbColumnParameterDataDbColumnParameterData and the SqlCmdParameterSqlCmdParameter for error checking and validation purposes.
Figure 4 The CDataTableModelCDataTableModel and the DataTableItemBaseModelDataTableItemBaseModel both aggregate the SqlCmdParameterSqlCmdParameter class
Each public parameter in a DataTableItemBaseModelDataTableItemBaseModel super class references an instance of the SqlCmdParameterSqlCmdParameter class.
Figure 5 All of the super classes of the DataTableItemBaseModelDataTableItemBaseModel currently in use
This is an exaampleexample of a super class of the DictionaryTableModelDictionaryTableModel. In the user
interface category was renamed as Genre.
This is an example of one of the more complex implementations of the
CDataTableModelCDataTableModel class.
This is the implementation of the DataTableItemBaseModelDataTableItemBaseModel for the previous
table.