Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 13 May 2003 @ 08:39:31 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Recursive sql
 
From:   David Wellman

I think you'll find that the second option that John talks about below is the one used in Teradata to store the database and user heirarchy. This information is accessed through view dbc.children.

In the underlying tables , if a user/database is at level 5 in the heirarchy (with DBC being at level 0), then this user/database will appear in the Child column 5 times. The following query will return 5 rows.

sel * from dbc.children where child='xxx';

As John notes, if the structure is very volatile then maintaining it can be a big overhead, but the upside is that a number of queries run very quickly.


Regards,

Dave



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023