Accessing an External Relational Database from JADE
You can access the relational database using the JADE language and by navigating relationships using inverse references; for example, you can code the following style of iterative access.
foreach emp in dept.employees do emp.display; endforeach;
This code uses the external iterator and an external collection. The external collection issues the required SQL query to create a virtual collection of instances; that is, the rows of the employee table, where employee.dept_id = department.dept_id. The dept_id foreign key is obtained from the virtual department instance, which is the parent of the virtual employee dictionary.
The
The external iterator and external collections enable constructs like the