Re: A quick newbie question on TOP.



Harry wrote:
1. Can it be used for non-database oriented *but* a large-scale
C++/Java application as an alternative to OO? The collections data
(counterpart to database rows) in this application may be deserialized
from a flat file or from a network port but eventually would all reside
in memory.

2. No sitemap provided (for http://www.geocities.com/tablizer/top.htm),
so don't know if TOP comes with some sort of ref impl of, say, a query
language, or is it all just theory and proposals to the developer
community :-) ?

3. Example: A class Trainer, that starts out as a simple Human in the
application but in which each new relationship/aspect (citizen,
employee, etc) gets 'discovered' by chance, let's say every now and
then, and thus must be added/addressed with minimal changes to the code
in minimal time, i.e. in the most agile way.

Trainer
is-a human (name, dob, sex, height, weight, color, strengths,
weaknesses...)
is-a citizen (country, country-of-origin, since-when, ssn, ...)
is-a employee (company, ...)
is-a teacher (atInstitution(s), ...)
is-a professional (atInstitution(s), ...)
is-a colleague (...)
is-a parent (...)
is-a traveller (...)

I believe what you are describing is typically called "roles". In
relational systems it is usually represented with a many-to-many
relationship. Example:

table: people
-------------
personID
personName // in practice, we would have first, last, etc.

table: roles
-----------
roleID
roleName

table: personRoles
---------
personRef // foreign key to People table
roleRef // foreign key to Roles table

As far as things like institution and company tracking and so forth,
perhaps you could do something like this:

table: personRoles
-----------
personRef // foreign key to People table
roleRef // foreign key to Roles table
locationCategory // examples: "college", "company", etc.
locationRef // foreign key to corresponding College table, Company
table, etc.

In same ways your request is kind of like an AI knowledge base. You may
want to look into various AI techniques if you want to get that "meta".
It is probably doable with a relational system, but you won't find a
lot of help using them for such.

-T-

.