0

I have exported my sql statements from phpmyadmin 'data.sql'. I wish to reverse engineer the sql file to display the relational database diagram. Is there a way? I tried tools such as Visio, it is not accepting .sql files.

Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
Dwayne Johnson
  • 69
  • 1
  • 6
  • 18

3 Answers3

0

How about just executing it locally, and then look at all the tables, views, data, etc from there? All depends on what data.sql actually contains. If its insert statements only, you can only guess on the schema. If it is CREATE TABLE statements, you will have more luck.

Issa Fram
  • 2,556
  • 7
  • 33
  • 63
0

It should be very simple, although you won't get datatypes. The data.sql should show you column names and table names, from there it's a pretty simple jump to assembling the table.

Whetstone
  • 1,199
  • 8
  • 8
0

That's not reverse engineering but you can certainly use tools such as MySql Workbench to create ER Diagrams from existing databases.

For SQL Server, SSMS has an option to generate Database diagrams.

Icarus
  • 63,293
  • 14
  • 100
  • 115