question

ch.venkatesh514 avatar image
ch.venkatesh514 asked

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)
sql server
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
This site functions according to votes. For all helpful answers below, show this by clicking on the thumbs up next to those answers. If any one answer lead to a solution, indicate this by clicking on the check mark next to that answer.
0 Likes 0 ·
SQLGoooRooo avatar image
SQLGoooRooo answered
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][1] [1]: /storage/temp/1801-viewdependancies.png

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Venkataraman avatar image
Venkataraman answered
You can use Database diagrams in SQL Server Management Studio to see relationship between tables. Refer to http://stackoverflow.com/questions/22447766/is-database-diagram-in-sql-server-management-studio-considered-as-er-diagram
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ch.venkatesh514 avatar image ch.venkatesh514 commented ·
i need to write a Procedure or a Sqlserver script to find out the hierarachy of these objects. please suggest me.
0 Likes 0 ·
Venkataraman avatar image
Venkataraman answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ch.venkatesh514 avatar image
ch.venkatesh514 answered
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.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.