Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!oliveb!amdahl!netcom!rodent From: rodent@netcom.COM (Ben Discoe) Newsgroups: comp.object Subject: Has anyone taken an approach like this? Message-ID: <1991Mar19.042444.20834@netcom.COM> Date: 19 Mar 91 04:24:44 GMT Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 49 This is NOT an object-oriented Programming article. No C++, etc. This concerns object-oriented philosophy and mechanics. I've been thinking heavily about an approach to object-oriented databases that mixes in elements of hypertext, knowledge-representation, etc. It's basis is this: is there a way to represent objects and the relationship between then in a fashion that isn't redundant or brute force? I think there is, but I'm having some trouble implementing it. Rather than store every relationship twice: (The following Capitalized words represent CLASSES, not instances) Dog Bird ---- ---- ... ... eats Bird is eaten by Dog I'd rather store the relationship once: Dog "A eats B" relations Bird ---- -------------------- ---- ... ........... ... eats -> DogOID/BirdOID <- eaten by This way we can query "What does the Dog eat" and "What eats the bird" and the searches can be non-brute force: we just follow the link to the relationship, which contains the ID of the two involved objects. Can generality also be represented this way? We can say "The Dog eats meat." which will form a "A eats B" relation between the dog and an aspect of the Animal class, a superclass of Bird. Then when we query what eats the bird, we can search upwards through the class heirarchy for any "eaten by" relations. These relations may be dependent on the value of a class field, in which case we check to see if the object in question (the bird) has the appropriate value for the realtionship to apply to it. Now, how do we represent this in the relations list? I'd be interested to know: 1. Has anyone ever seriously taken this approach? 2. Are there any obvious drawbacks? 3. This method seems appropriate for modeling anything from an encyclopedia to a rainforest to a coin collection. Why can't I find anyone else pursuing it? I've scanned all the papers and conference proceedings I can get my hands on. 4. Am I being foolishly naive and grossly underestimating the potential difficulties? ---------------- Ben in San Jose, idealistic visionary, computer scientist, ecologist.