Page 791 - ExtendSim User Guide
P. 791

Data Management and Exchange 765
Other internal data storage and management methods
2) Parent/childrelations.Theuser-definedparent/childrelationsintheIndexedFieldstable are validated. This check ensures that each child and parent table and each parent and child field referenced in the Indexed Fields table actually exists in the database workbook.
3) Tableandfieldnameuniqueness.Thisensuresthateachtablenameinthisspecificwork- book is unique and each field name is unique for the given table.
4) Eachvalueunique.Thislooksattherecordcontentsforeachfieldwherethefieldproperty named Unique is designated as Yes. The validation ensures that all values in the corre- sponding tables are unique.
5) Thedatabaseischeckedforanyrequireduniquefields.Ifsomeparentfieldsarenot marked as unique, the Add-In will resolve any parent/child conflicts by linking the child to the first appropriate parent field it locates.
Any errors are reported on an Excel worksheet with hyperlinks to each error and an appropriate error message.
Find Table by Sheet
This command allows users to quickly find and go to a database table in their workbook. Selecting the command opens a dialog that displays a list of all the worksheets for the database and all the tables in the selected worksheet.
Other internal data storage and management methods
While ExtendSim databases will probably be your primary method of storing and managing data, ExtendSim provides several other methods. These are:
• Global arrays discussed starting on this page • Dynamicarraysonpage768
• Embedded objects starting on page 768
• Linked lists discussed on page 770
Global arrays
A global array is a two-dimensional (row and column) array of data that is accessible by any block in a model. Like ExtendSim databases, global arrays are user-accessible structures for internally storing and managing data. Use global arrays to share information between blocks when a direct connection is either inconvenient or impossible, to store information that can be accessed by a row and column index, or to exchange data with external sources.
Global arrays provide many of the same modeling advantages that ExtendSim databases do; see “Advantages of using internal databases” on page 747, but they differ from databases in some important aspects. Compared to databases, global arrays have a simpler data structure and take less time to access data. However, global arrays aren’t as flexible as databases, which allow mixed data types, randomness, and parent/child relationships. It is also easier to add or remove fields in a database than columns in a global array, and creating a global array requires adding a block to the model.
☞ Unless you are using custom blocks that create global arrays, a Data Source Create block must be in the model to initially create the global array. Since the global array is saved with the model, the block can be removed after the array has been created.
While it is common to use a database for managing and exchanging data, global arrays are handy in situations where:
How To


































































































   789   790   791   792   793