Hlavní navigace

Názor k článku Modelování databází od Karel Zak - V nekterem materialu k Oracle jsem to videl...

  • Článek je starý, nové názory již nelze přidávat.
  • 4. 4. 2002 11:10

    Karel Zak (neregistrovaný)

    V nekterem materialu k Oracle jsem to videl trefne pojmenovane jako WALK TREE. Pokud je mi znamo tak jina DB nez Oracle tuto vlastnost primo na urovni SQL neimplementuje a ani standard nic takovaho neobsahuje. Ostatne SQL jako takove je nerekurzivni. Obavam ze, ze i to prochazeni strumu bude uvnitr Oracle implementovano jak mnoho selectu. Jine reseni mne moc nenapada, snad jen nejak specialne delane indexy, kere v sobe zahrnuji danou hierarchii. Jinak viz. docs k Oracle8:
    Oracle uses the information from the above clause to form the hierarchy using the following steps:

    1. Oracle selects the root row(s) of the hierarchy-those rows that satisfy the condition of the START WITH clause.
    2. Oracle selects the child rows of each root row. Each child row must satisfy the condition of the CONNECT BY clause with respect to one of the root rows.
    3. Oracle selects successive generations of child rows. Oracle first selects the children of the rows returned in step 2 , and then the children of those children, and so on. Oracle always selects children by evaluating the CONNECT BY condition with respect to a current parent row.
    4. If the query contains a WHERE clause, Oracle eliminates all rows from the hierarchy that do not satisfy the condition of the WHERE clause. Oracle evaluates this condition for each row individually, rather than removing all the children of a row that does not satisfy the condition.