[Babase] ranker again

Jun Yang junyang at gmail.com
Thu Oct 5 22:27:50 EDT 2006


Please see my replies below:

On 10/5/06, Karl O. Pinc <kop at meme.com> wrote:
>
> My comment is that if consistency should be enforced
> then this is something that the database should do.
> We should probably make this data-driven, so that
> there's a "master" column (or some such name)
> on RANKTYPES that indicate that one ranktype is a
> "master" of another and the rankings must be
> consistent with respect to the "master".
>
> Is this a general enough approach that it's likely to accomodate
> whatever sub-rankings there might be of of "ALL" or other
> sorts of ranking schemes?  If not then we need to talk about this
> further.

Master-slave (or consistency) relationships among rankings could
in general form a directed acyclic graph. In other words, it is plausible
(though it doesn't come up in our case) for one ranking to have two
masters (and vice versa). We could invent another "ranking consistency"
table to capture such relationships, but given that we have only a very
small number of ranking types, I'd vote for just a handful of triggers
(probably 4 is enough) to enforce consistency, instead of complicating
the schema further.

> The other question to consider is intervals over which ranks
> are computed/in-effect.  If rankings are always month-by-month
> then this is not an issue.  At the moment all the validation
> code assumes that the ranks that are saved are computed based
> on group membership that occurs during a single month --
> the check that says you've got to be in the group (or
> supergroup) during the month in order to be ranked.

Yes, currently membership in a ranking is completed dictated by
the definition query associated with the rank type for a given month.
If we allow arbitrary ranking periods, the notion of consistency
become not as well-defined.

--- Jun Y.


More information about the Babase mailing list