Forum OpenACS Improvement Proposals (TIPs): TIP #52 (Approved) Create abstract layer over RDBMS system catalogs
Title: Create abstract layer over RDBMS system catalog
Version: $Revision: 1.00$
Authors: Alfred Werner <alfred hat thunderstick dawt com>
Created: Friday, 27 February 2004
Discussions To: http://openacs.org/forums/message-post?forum_id=115570
The OpenACS kernel provides a mechanism for storing extended attributes of system objects. Specifically, acs_attributes* and acs_datatypes are intended to map into the physical storage layer of the underlying RDBMS. Currently there is no mechanism for interrogating the underlying system catalog to run audits to compare coverage of the OpenACS catalog against the underlying RDBMS catalog. Providing this abstraction will make the 'data soup' effort much easier and consistent.
I would like to create three specific VIEWS and add them to the OpenACS kernel. acs_tables, acs_views, and acs_constraints. I don't think indexes are necessary from a 'logical design' perspective. Omitting it would be in keeping with current practice. A large portion of the work already exists thanks to the schema-browser package.
Not in Scope
There are additional items in both the Oracle and Postgres catalogs - including data type definitions and other items that probably should be considered in the future where equivalencies exist.
It sounds fine by me, but wouldn't it make more sense to put these views in a monitoring package (thereby making this tip redundant) ?
Since you can't really ADD a row even if the view ends up as updateable and expect the tables to appear, I don't really see any harm in creating these.
The purpose is NOT for monitoring, but rather to complete the internal representation all the way from CR->object->table/column (for example).
is something we could use for making upgrade scripts a
little safer (like a clean way to check if a constraint
or index exists already).