Hiearchy of an objects qwith multiple parents and childs from different sources
there is a scenario in my project.its like we have a last child object its connected to a parent(one or many) in table1. and the same object is connected to a diff Item(parent) in table2. like table1 Object1 --- Object2 table2 Object2 --- Item1 so..its like Object1 --- Object2--- Item1 and Object2 connected to a object3 object3 connected to a diff Item Object1 --- Object2(one or many)--- Item1 (one or many) Object2(one or many) ----- object3(one or many) --- Item2 (one or many) Object3(one or many) ----- object4(one or many) --- Item 3(one or many) i want to find out all the relationships for the Object1(top level parents)
I like using Toad Data Modeler to map out a whole database (automated entity relationship diagram) if that's what you're looking to obtain. Quest offers a free trial.
http://www.quest.com/toad-data-modeler/ If you want something that will show you dependencies from the out of the box Management Studio I would navigate to the Database then Tables (or other object) and right click then select "View Dependencies". ![alt text] : /storage/temp/1801-viewdependancies.png
i need to write a Procedure or a Sqlserver script or CTE or Function to find out the hierarachy of these objects in sql server 2008. i dont need to findout the Dependancy tables for those objects. please take the objects i mentioned as example and suggest me.