DB Links across the Enterprise, a Connectogram with d3.js (Work In Progress)
Submitted by dave on Mon, 07/16/2012 - 00:43
The IdeaI have been seeing a lot of chord and connectogram types of visualisations and an idea immediately popped into my mind. I have a homegrown system that collects information from 500+ databases every evening. We constantly struggle to keep up with Database Link requests between databases. I wanted a way to visualize the DB link connections between all of these databases:
- Circular graph with database names in outside ring
- Cluster the database names by application
- Show each database link as lines between nodes
- Indicate sources/targets for each relationship
- Link color progression - Green shading source, red shading target
- Gravity slider
Demo of Result
- The data in the database lives in a simple 2 column table that holds Source DB and Target DB.
- I used an Application Express Dynamic Action to read the table and produce JSON output...
d3 Related Logic for Rendering/Updating the visualizationI was able to find examples, inspirations, and prior art to use as good starting places.
Cluster Layout API / ClusterRadial / MBostock Bundle Example
Putting it all TogetherAs sometimes it is easier to develop dynamic behavior like this in straight HTML and then port to Apex I mocked up and refined what I wanted in a straight HTML page first, then ported to Apex after that. Here is the final version that I was happy with: links.html
Create table in your Apex DBDDL and sample data are here: links.sql .
Create Dynamic Action
- Edit your page
- Add a Page Process
- Select "PL/SQL"
- Name your process GetData
- Select "On Demand - Run this process when requested by AJAX"
- Select Next
- Enter the PL/SQL you want to run On Demand and click Create Process. In this case see logic.sql