Re: Generic Modeling

From: James <jraustin1_at_hotmail.com>
Date: 3 Jan 2002 16:52:47 -0800
Message-ID: <a6e74506.0201031652.4ab72a1f_at_posting.google.com>


> I would like to see how would you query the equipment scattered at various
> levels of the hierarchy in OODB.

It is easy. The follow object-based query which can be generated from the oodb's interface would find all equipment under desired hierarchy.

Query1 - Find all Equip in the Mfg Folder   Type
    Select
  SearchMethod
    Instances
      ->Equip
  Critieria
    AncestPar
      ->MfgFolder

Specifically, it says, Select all instances of Equipment whose Ancestor Parent is the MfgFolder. The hierarchy under MfgFolder can be modified. The equipment can be located anywhere in the hierarchy under MfgFolder. The above query would find them regardless. In the hierarchy shown below, you can cut/copy/paste things as you please and the query would still find them. You could introduce new types of instances in the hierarchy (ie conf rooms, closets, basements, roof) and move the equipment under them and the original query would still find them. (It is nearly impossible to write the equivalent query in sql).

MfgFolder
  GM
    NorthAmerica

      USA
        MI
          Detroit
            VortexEnginePlant
              Equip1c[Equip]
              Plant1
                Floor1
                  PistonArea
                    Equip1d[Equip]
                    ForgingCell
                      Line1
                         Equip1a[Equip]
                         Equip1b[Equip]


www.xdb1.com/Basics/Query.asp

www.xdb1.com/HowTo/CreateQuerySimple.asp www.xdb1.com/HowTo/CreateQuery.asp Received on Fri Jan 04 2002 - 01:52:47 CET

Original text of this message