> Below, I have included some SQL, contributed or linked by Keith Medcalf in this forum some time ago. It implements something like the catalog mentioned in Codd's 4th rule and available in heavy-weight DBMS's. Sidebar for those attempting to use this schema via arbitrary applications: they might impose restrictions which break these queries. e.g. fossil disallows `pragma_index_list()`: ``` $ fossil sql -R ../libfossil.fossil ... sqlite> select * from SysIndexColumns limit 10; Error: unsafe use of virtual table "pragma_index_list" $ sqlite3 ../libfossil.fossil ... sqlite> select * from SysIndexColumns limit 10; table|blob|sqlite_autoindex_blob_1|0|3|uuid|0|BINARY|1 table|blob|sqlite_autoindex_blob_1|1|-1||0|BINARY|0 table|delta|delta_i1|0|1|srcid|0|BINARY|1 table|delta|delta_i1|1|-1||0|BINARY|0 ... ``` Not a bug, just something to be aware of.