graph TD
%% PostgreSQL Object Hierarchy including system catalog & information_schema
subgraph CLUSTER[Database Cluster]
direction TB
subgraph DB1[Database: app_db]
direction TB
%% System schemas
subgraph DB1_SYS1[Schema: pg_catalog]
DB1_SYS1_T1[Table: pg_class]
DB1_SYS1_T2[Table: pg_type]
DB1_SYS1_T3[Table: pg_attribute]
end
subgraph DB1_SYS2[Schema: information_schema]
DB1_SYS2_T1[View: tables]
DB1_SYS2_T2[View: columns]
DB1_SYS2_T3[View: key_column_usage]
end
%% User schemas
subgraph DB1_S1[Schema: public]
DB1_S1_T1[Table: users]
DB1_S1_T2[Table: orders]
end
subgraph DB1_S2[Schema: accounting]
DB1_S2_T1[Table: invoices]
DB1_S2_T2[Table: payments]
end
end
subgraph DB2[Database: analytics_db]
direction TB
%% System schemas
subgraph DB2_SYS1[Schema: pg_catalog system catalog]
DB2_SYS1_T1[Table: pg_class]
DB2_SYS1_T2[Table: pg_type]
end
subgraph DB2_SYS2[Schema: information_schema]
DB2_SYS2_T1[View: tables]
DB2_SYS2_T2[View: columns]
end
%% User schema
subgraph DB2_S1[Schema: public]
DB2_S1_T1[Table: events]
DB2_S1_T2[Table: sessions]
end
end
end