Forum OpenACS Q&A: Response to What should be included in OACS 4.6

Collapse
Posted by Tom Jackson on

Both databases OpenACS supports are relational, and the language used to talk about the datamodel doesn't change that fact. The OpenACS datamodel is relational. What that means to me is that it is a very fluid object model. Any row from a select query is an object. Any row from a table is an object. Objects in languages like Java are fixed and require programming effort to create. In an RDBMS, the super object is the entire database and the SQL language. You can use the methods of the SQL language to extract parts of the data, to change the data and to create new data (objects).

What PL/SQL does is to extend the methods that operate on the data, maybe simplifying the interface to the database. In the case of creating an acs_object, the __new procedure handles quite a bit of effort. If this effort were moved to the tcl layer, the porting effort would extend to every page that called the __new procedure. Instead of one change, potentially many would be required.

For me the most time consuming porting effort seems to be the select queries. The join syntax for Oracle and PostgreSQL are significantly different.

If standard PL/SQL and plpgsql packages were used for create, update and delete operations, most of the pl could be auto generated. All that would be left to port would be special operations. These special operations could be moved to tcl procedures, which could perform the operation in tcl or simply wrap a pl function.