This information is available in the vSphere API, though it may not be in the actual VCDB. In general, you should use the vSphere API to extract information from your environment versus going directly to the vCenter database as the schemas/tables may change. The other issue is how the SQL statements are crafted, you may cause an infinite loop which can degrade performance on your vCenter system if not potentially introducing an outage.
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at:
Twitter: @lamw
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Community
If you find this information useful, please award points for "correct" or "helpful".