When possible values of parameters of fragments drawings or assembly drawing can be organized in the form of a table in which, depending on one or more key fields of the table, other parameters can be determined, it is convenient to use databases. The database can be internal or external. Internal databases provide a high speed of selection of values. External - the ability to access from different drawings to the same database plus compatibility with the widely recognized database storage standard - dbf. For more information about how to access databases, see Databases, Variable Value List, Creating Libraries of Parametric Elements sections.
The most common usage of databases is storing parameters of standard items. It allows to get all possible standard sizes of an item from a single document by specifying desired values of external variables, when inserting fragment into assembly. The drill jig example, contains several standard items: screws, bushings, rest buttons, eye bolt, handles, pins.
In the handle document all parameters are stored in the single database. In order to get a desired size of the handle, it is enough to specify the desired mounting diameter and version. These parameters are defined via external variables. Then, depending on the diameter, the system automatically selects required values of other parameters of the handle using the frec() and val() functions, while the version number manages the visibility of lines related to different versions.
The rest of the standard items used in the drill jig assembly are creating using more complex approach. Their main parameter is also diameter (thread diameter of bolt and screws, internal diameter of bushings, pin diameter, rest button head diameter). However, unlike the handle, here an item of a single diameter come in multiple length or height sizes. Therefore, in addition to the database storing parameters dependent on diameter only, there are separate databases for each standard value of diameter storing parameters dependent on length or height. When inserting such fragment into an assembly, a specified diameter value defines the name of the database, and then frec() and val() functions are applied to such database, in order to get values of parameters corresponding to either distance between fixing point (if the fragment is inserted by fixing points), or a manually inputted length/height value (if the fragment is inserted by fixing vector). When inserting the fragment by fixing point, the actual length or height of the item is also selected from the database as nearest higher value to the distance between fixing points, since such distance may not coincide with any of the standard lengths/heights.
Standard items included into the drill jig example use internal databases stored within each item's document, which eases the fragments transfer between folders and devices, but doesn't allow to access a database from a different fragment.
However, when linking variables of different fragments to each other, it may be helpful to use a common database for multiple fragments. In the our example, the pins diameter (Dpins) specified by the user defines the geometry of the eye bolt. In turn, the diameter of the eye bolt coincides with the mounting diameter of the handle, and the diameter and width of the bolt's eye affect dimensions of the drawn parts. Therefore, all of these parameters are selected in assembly from the common database and then being passed into fragments using links between variables. The same result could be achieved by selecting values separately in each fragment's document from a common external database. Keep in mind that some formats of external databases require different functions. The fact that external database is stored in separate file should be taken into account, when moving and copying fragment files.