Hi all,

Some might've heard about the oracle implementation I've been
building; hereby a small update on its status.

The storage code is currently all in CVS in the HEAD (1.8) branch. It
could be backported to 1.7 if anybody needs it, but since there
already are plans to release 1.8 in the near future, I don't see the
added value.

What does it do? For every builder it creates a table
(MM_builder_TABLE), and a view MM_builder that selects fields from the
parent and the table. Triggers on the MM_builder view are created for
'insert', 'update' and 'delete' commands; to delete from the table and
the parent. This means you can use the views just as normal tables,
updates/inserts/deletes on them are automatically propagated to all
parent builders.

Furthermore, a lot of referential constraints are put in. For example,
you can't insert a node with an otype that doesn't already exist as a
number in the mm_object table. If you enable constraints with 'on
delete cascade', it gets even more fun: the following command will
drop all objects from all tables:
  DELETE FROM MM_OBJECT WHERE M_NUMBER = 1;
(this behaviour is not enabled by default).

There are some caveats in the implementation:
- The maximum identifier length in oracle is 30. If you have
identifiers that are larger, the storage layer will generate unique
identifiers, but they are not very pretty.
- I think I fixed all restricted keywords (the 156 EO builders load
nicely now), but I did create it on trial-and-error; it might not be a
complete list.
- Oracle is very strict in 'NOT NULL' values; also the empty string is
considered NULL. For instance the editors don't understand this very
well, and you will see a nice stacktrace when inserting objects with
empty values for NOT NULL columns.
- An SQLHandler is still in the make to support 'LIMIT' like queries.
This will probably have a performance impact since oracle doesn't
really support this; you might not want to enable it but I will add it
for completeness.
- Alter table commands are not yet supported, but should be fairly
easy to make.
- Oracle supports text-indexes; I will try to incorporate that into
the SQL handler.

Johannes
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to