1

I have some SQL scripts written in a .sql file I need to generate ER diagram using those scripts, so that I can verify the relationships and then get them executed in the DB.

Can anyone help me on how I can achieve this? I would prefer doing this in SQLDeveloper

EDIT: As ismetguzelgun suggested me in his answer to execute the scripts first and then export the diagram through data modeler. I do not have the permission to execute DML commands in the Database and I do not have any other database as well where I can execute this. So that option is not going to work out for me.

2

1 Answer 1

1

Just use the import feature.

File - Data Modeler - Import - DDL Script

enter image description here

Point to one or more .sql files.

enter image description here

A dialogue will appear showing what's about to be added to your design. Make sure everything's checked and hit the Merge button.

enter image description here

Your new/existing design is ready!

enter image description here

If you don't see anything in the diagram area, zoom out or use the Navigator window to make sure you're in an area with your tables. Or use the tree on the left, pick a table, and right click, 'Go to Diagram' - it will take you directly to that object in the diagram.

3
  • I did this and got a blank window after merge. I had selected oracle 12c
    – derek
    Commented Aug 13, 2020 at 12:46
  • Updated my answer @derek. See if that helps. Commented Aug 13, 2020 at 13:23
  • 1
    Important point is to make sure we zoom out. Thanks a lot! Works like charm.
    – derek
    Commented Aug 13, 2020 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.