From: Alex B. <en...@tu...> - 2001-08-23 18:47:07
|
> > An interesting problem becomes maintaining some mechanism of storing > unique ids which are not the primary key of a given entity table and are > not unique. After some high level thinking on the subject, we had > decided to store all unique object identifiers, let's call them OID for > short, or, keeping with bc nomenclature, EID, in a separate table from > which any new entity creation process would request and receive a new > EID before inserting a new entity into it's entity table. That's interesting. In which case you _could_ just use a normal entity, and have the actual data entity separate. > The EID table would store the EID and the entity table. Adding columns > to this table allows very cool things such as locking entities (set a > flag in the central EID table), check-in and check-out of entities, etc. Yeah. heh. CVS in oracle! > This versioning business will also have significant impact on the fields > of type "pointer". I.e. if the referred entity type is versioned, do > you store the EID, or the actual ID from the entity's table (in order to > point to a particular version of the entity as opposed to always > pointing to the latest). This, perhaps, needs to be configurable as > well. Using the furbee_type_id field from entity_new.xml, let's say > that furbee_types are versioned - because Furbees, Inc. routinely > changes type definitions, and a given instance of a furbee's type should > never change. In this case, we want to always point to the same version > of the type. > > [ *snip* ] > <field> > <name>furbee_type_id</name> > <label>Furbee type ID</label> > <desc>The id of the type of furbee</desc> > <path>furbee_type_id</path> > <required>true</required> > <type> > <dbtype>int</dbtype> > <!-- > note the "pointer" type > this field is a pointer to another entity, and a > foreign key in the database. > --> > <type>versioned_pointer</type> > <!-- > If we had parameters in the XML definition, we could do > something like: > <type param="versioned">pointer</type> - to keep from > creating too many > like types which have only minor variations. > --> > <!-- > form above, the entity name to use for requesting > data from this pointer > --> > <entity>furbee_type</entity> > <maxlength>20</maxlength> > <format>/[\w\s_\-\.]{0,20}/</format> > </type> > </field> > [ *snip* ] yes, though I think I'd want to have that "versioned" flag be part of the top-level entity definition. ... _a |