km_metadata_elements table

Philip Greenspun's Homepage : Philip Greenspun's Homepage Discussion Forums : 6916 : One Thread
Notify me of new responses

Assuming I'm understanding it correctly, in the km_metadata_elements table:

If a user enters "mapping" as the value for "abstract_data_type", he or she shouldn't be forced to enter a value for the "oracle_data_type". Right?

But the table has a constraint on "oracle_data_type": it can't be null.

Maybe the CREATE TABLE statement for km_metadata_elements should remove the "not null" constraint on oracle_data_type have an added constraint like:

check((abstract_data_type != 'mapping' and oracle_data_type is not null) or (abstract_data_type = 'mapping'))

-- Oludotun Fashoyin, October 29, 1999

Answers

oracle_data_type for mapping

For now, you can assume that the "mapping" oracle data type is an integer. The primary keys of the metadata tables will be generated from the "object_id sequence" that generates object_ids for all objects.

-- Jesse Koontz, October 30, 1999

You are correct, Oludotun. It doesn't make sense to have an Oracle data type for a mapping since the mapping is done in a separate table anyway.

-- Philip Greenspun, October 31, 1999