Reading from a database is done at the beginning of a simulation run by loading a Vensim Database Input (.vdi) file. The database input file acts very much like a constant changes (.cin) file except that it reads information from a database, and also allows you to specify Data variables, not just Constants and Lookups. The database input file is also a little more strongly structured than a changes file. In fact, it most strongly resembles the custom graph definition file.
To load a database input file just specify it in the list of changes input files on the Changes tab of the simulation control dialog. Based on the file extension (.vdi) Vensim will process this as a database input file.
When Vensim reads information from a database it creates temporary structures to hold that information before incorporating it into the simulation. This is necessary because time based information for Data variables and x,y pairs for Lookups are likely to be spread over a number of records and be encountered in arbitrary orders. Normally, it is best to just let Vensim manage this but there may be situations where you want to explicitly force Vensim to incorporate information and start the temporary storage process anew. For example, this might happen if you had a full set of data in a primary table and a single data series in a secondary table that you wanted to use instead of the data in the primary table. To do this use the INTERNALIZE command.