Predictive models are stored in a database as binary strings. This is the best and the simplest option for a relational database, but the binary string cannot be used in R or Python script directly. When the model has to be used for predictions, it must be queried from a database table in which it is saved and the the model must be transformed back to a format that is suitable for the external script.
In Chapter 9, Predictive Model Training and Evaluation, we created two alternative database schemas that can be used for the storage and versioning of predictive models. First, we used common tables without any kind of built-in record versioning. These tables the filestreams to store the binary string of the models. Secondly, we used temporal tables, which provide a very native method of record versioning. In this section, we will read the desired versions...