>
> This made me consider how we might define controlling and dependant
> associated attributes, and I came up with the following suggestion.
I've also needed to extend the dictionary meta-data model. These are
my enhancements:-
1. Primary D-Types start with DM (for master). By this I mean the
most important D-Type that defines the Justification, conversion,
length etc. All other synonyms are just ordinary D-types. Martin has
already confirmed that this will not interfere with other parts of QM.
This was part of Tom DeLombarde's PHP development, where he needed to
be able to extract a dataset view.
2. I store a single character in field 8,1 of the dict to denote the
datatype. So far I use B=Boolean, C=Currency amount, D=Date,
F=Floating point number, I=Integer, R=Raw, S=String(utf-8), T=Time,
U=UTC timestamp (AREV/OI format).
3. I define the controlling attribute as the FIRST field in the
association PHrase; All subsequent fields are dependent attributes.
4. I place foreign keys into dict field 8,2 of a D-type. I've made
this multi-sub-valued in case there is a need to join to multiples
files. I usually avoid this though. Arev/OI call this <verifile>.
These are mostly my own methods, and I've tried to make sure there is
little conflict with existing usage. I've parameterised this within
my usage, so that I can change it easily if Ladybridge were to define
an official place for the storage of this meta-data.
Ashley Chapman
> I don't know how QM handles controlling and dependent
> attributes, and time to look it up at this moment is fleeting.
This is one of the few areas where I think Pick did a better job than
Information. In the Information model, all attributes in an association are
of equal importance whereas Pick makes one of them more important than the
rest.
When I teach multivalue training classes, I bring this out in the context of
a simple sales application by pointing out that the customer came into the
shop thinking "I need some part 102, how many shall I buy", not "I'm going
to buy three of something, what will it be".
Because QM is largely based on the Information model, although we support
A/S type dictionary items, the controlling/dependant part of field 4 is
ignored, making all associated attributes of equal importance. It probably
would not be difficult re identify one as controlling but we need a clear
definition of what this should then do. In my 20 years experience of
multivalue, I cannot recall a situation in which I needed to know which
attribute was the controlling one within the associated set.
The query processor does make extensive use of associations in pairing up
items correctly. From a recent thread on this group, we believe that QM is
possibly the only mv product that gets this right down to the subvalue
level.
Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200
2009/2/24 Martin Phillips <martinp...@ladybridge.com>:
>
> Hi Dale,
>
>> I don't know how QM handles controlling and dependent
>> attributes, and time to look it up at this moment is fleeting.
>
> This is one of the few areas where I think Pick did a better job than
> Information. In the Information model, all attributes in an association are
> of equal importance whereas Pick makes one of them more important than the
> rest.
>
> When I teach multivalue training classes, I bring this out in the context of
> a simple sales application by pointing out that the customer came into the
> shop thinking "I need some part 102, how many shall I buy", not "I'm going
> to buy three of something, what will it be".
It's a good job you never had my wife in your class! The articles she
buys are random, it's just the quantities that are fixed. ;-)
>
> Because QM is largely based on the Information model, although we support
> A/S type dictionary items, the controlling/dependant part of field 4 is
> ignored, making all associated attributes of equal importance. It probably
> would not be difficult re identify one as controlling but we need a clear
> definition of what this should then do. In my 20 years experience of
> multivalue, I cannot recall a situation in which I needed to know which
> attribute was the controlling one within the associated set.
Generally it's not needed, although in the query processor you have to
count up the multivalues in each association to determine the maximum
before you output a record. By having a controlling attribute, I only
need to count up that one, and output from there. A bit helpful with
XML.
The main benefit is that it encourages you to describe the data model
structure. That helps as the system ages, and other people work on
it.
Don't get me wrong, it's something I can live without. It just makes
things a little tidier. Especially where there are a lot of null
multivalues in an association.
--
Ashley Chapman
> I guess the pairing will take care of most in the multi-values
> that I can think of at this time. Although I do have a data table
> or two where there are two sets of controlling and dependent
> attributes.
That's fine. With D/I type dictionary records, you give each set of
associated fields a name and there can be any number of such sets. With A/S
type records, we use field 4 to identify the fields in each association and
effectively build an association name of our own so again there is no limit.
The only bit we don't do is to treat one field as being more important than
the others. I have no idea what we would do with this anyway on the context
of a report.
> I will need to do more investigation into all the nuances that
> D3 can do and compare that with QM.
There has been a lot of work in recent releases to improve compatibility. QM
2.8-9, due out in the next few days, adds further improvements.