Questions such as "what depends on this server" or "what can this user reach" are answered by following foreign keys outward from one row. This release adds that walk to the data layer and to server-side scripts, with a generic chart that knows nothing about what the boxes mean.
The walk
- From the catalogue The walk reads foreign keys through standard JDBC metadata, so Informix and PostgreSQL behave alike, and adds logical relations a profile declares. It runs one statement per relation per level.
- Bounded and safe Activity relations are counted, not listed. Secret columns are never read. A row already on the path becomes a reference rather than a loop. The tree stays about its start: rows further out are counted per relation and depth.
- Catalogue read once Foreign keys are read in one call for the whole database and indexed by table. On Informix, a server's tree had spent 97 of its 130 seconds reading the catalogue table by table.
From scripts and SQL
- Ax.db.relationTree(table, key, profile) Returns one row per box of the topology chart. The profile is configured by a JavaScript function, and a composite key is passed as an array.
- Ax.db.relationChart(rs, profile) Draws the rows of any statement as the same chart. The statement says what the boxes are; the layout groups them by kind. The access pictures moved from Java to SQL on this basis.
- XSQL tree walks A
connectBywalk can selectCONNECT_BY_ROOT, link on columns a child shares with its parent, and nest in a sub-query. PostgreSQL and MySQL render it as a derived table so it can sit insideINor aUNIONbranch. It is proved on seven engines.
The engine's own constraints are the model. A walk needs no hand-maintained graph, and a new kind of relationship is a row in a profile or a branch in a statement.