Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Way for Seeing the Table relationship Tree for a Database?

Friends, I am working on a issue in ERP which contains lots of Tables in it. I need to know the whole relationship between the table in a database to fix it. Is there any way to see all the Tables with their relationship among them of a database. I am using SQL Server Management Studio R2 64 bit OS.

like image 561
Gopichandar Avatar asked Oct 09 '13 10:10

Gopichandar


People also ask

How do I view table relationships in SQL?

Using SQL Server Management Studio Open the Table Designer for the table containing the foreign key you want to view, right-click in the Table Designer, and choose Relationships from the shortcut menu. In the Foreign Key Relationships dialog box, select the relationship with properties you want to view.

How do you show relationships in a database?

On the Database Tools tab, in the Relationships group, click Relationships. On the Design tab, in the Relationships group, click All Relationships. All tables that have relationships are displayed, showing relationship lines.

How can see ER diagram in SQL Server?

Open SQL Server Management Studio (SSMS). In the Object Explorer on the left, expand your database. Right-click on Database Diagrams, and then select New Database Diagram.


2 Answers

  1. Open your SQL Server management studio and enter into your DB.

  2. Enter into Database Diagrams and search for diagrams

  3. If there is no diagram, create a new diagram (right mouse click - New Database Diagram)

  4. Inside the Diagram use right mouse click, add all the relevant tables and see the relationships

    stage 1

Stage 4

You can see more info about DB Diagrams here

You can see here an example for diagrams with tables and relationships

like image 76
Ofir Avatar answered Oct 21 '22 18:10

Ofir


Use database diagrams in management studio and see whole tables and relations .

like image 42
Amir Keshavarz Avatar answered Oct 21 '22 16:10

Amir Keshavarz