I have a system that involves a rather large and complex oracle database, and while the system as a whole is easy enough (for me) to understand, the database feels more like a black box of mysterious powers that I need some assistance wrapping my head around.
Are there any analytical tools to help with this? Ideally, I’d like a tool that would connect to the database and make a diagram over which tables connect to which other tables, as well as naming any stored procedures relevant to each. If such a tool exists, that’d be grand, but any other tools that can help breaking down this rube goldberg machine into something more digestible would be great.
And yes, it is much overdue for a postgresql successor. Getting the current contraption mapped out is the first step in building its replacement.
EDIT: Oh, and this database also interacts a lot with orasched, as well as external processes. A lot of things that should have been a cron job is now a procedure stored in the scheduler. A lot of things that should have been an external script/program is a stored procedure. And most offensive of all: many things that should have been in a config file is part of an SQL table. Whoever built this contraption must’ve been paid to write SQL and nothing else.
A lot of what you’re looking for will be in the Data Dictionary Views, been a while since I’ve worked with oracle, but done something similar for tables and constraints in sqlserver. There’s scheduler, plsql, table, constraints (hopefully you have foreign keys) and column information available, a lot more as well.
Oracle SQL developer can import from an existing database into physical and relational models, Erwin and Redgate exist as well. But before going that route, DBAs may very well have the information you’re looking for, hopefully it’s modeled somewhere.
which tables connect to which other tables
You get no guarantees whatsoever that the database schema actually contains this information.
Some databases are set up with validation rules that an external tool can understand, that column FOO.BAR_ID represents a foreign key for column BAR.ID
But some databases (for example mine) have no such rules and depend on the developers to know this through documentation or occult consultation with the spirits of departed coworkers.
We usually just dump a whole load
SHOW CREATE TABLE
dumps into drawsql at work when we discuss database migrations, and then drop a bunch of “tables” with no columns as comments. I am not aware of an tool that could deal with procedures and such, but we’ve only looked at that, SQLyog and Intellij’s built-in visualizers.Dump every single schema, paste the whole thing to claude.ai, ask it to generate graphviz markup showing the whole thing as you requested. Give the result to graphviz, see what happens.
It might not work or might not work perfectly, but that is what I would try and it definitely has the potential to be better than staring at the text trying to make sense of it all. Depending on the size of the beast, you might have to do it in pieces with a defined mapping of table names to graphviz node names so that piecing it out works smoothly.
Yeah, something similar was my backup-plan.