Databases

When a Robot needs to access a database with a database step, such as Query Database and Store In Database, it does so by using a name for the database. A name for a database is not a database mapping in itself, but a reference to it.

A database name must be defined in the Databases section of the robot graph, such as myDB in the following example. The Database Mapping that the name refers to is the one that the database name is given when the Robot is called.



In the Call Robot step of your Basic Engine Robot, specify the name of the actual database mapping, such as objectdb.

This name will be used as input to the database name you specified inside the robot, and this is the mapping that the database step will be using when the Robot is called from the Basic Engine Robot. In the preceding examples, the database name myDB is associated with the database mapping objectdb, and any step in the robot accessing the myDB database will be using the objectdb database mapping.

This approach of passing database mappings as input enables you to easily reuse robots, because they are not bound to a single given database but can rather use different databases, depending on which database mappings are specified as input to those databases.

You can use more than one database in a Robot by specifying more than one database name in the Databases section and passing the corresponding number of actual database mappings. Database names follow the same naming conventions as variables and input parameters, but the names can overlap with variable and input parameter names. The actual database mappings specified in the Call Robot step may or may not be different, but the database names inside the Robot must be different.