5 Replies Latest reply on Apr 10, 2015 9:00 AM by David Last-Oracle

    Can you create ERD's from DDL files?

    2925193

      I am wondering if it is possible to reverse engineer DDL files to create relational diagrams. I am not able to connect the database and can only retrieve the DDL files for each table.

       

      This link shows how to do it in Microsoft SQL Server

       

      https://www.visual-paradigm.com/tutorials/reverse-ddl.jsp

       

      Is this possible to do in either Oracle developer or data modeler?

       

      Thanks for any assistance!

        • 1. Re: Can you create ERD's from DDL files?
          thatJeffSmith-Oracle

          yes

           

          File > Import > DDL FIle in SQL Developer Data Modeler

           

          or

           

          File > Data Modeler > Import > DDL File in SQL Developer

          • 2. Re: Can you create ERD's from DDL files?
            2925193

            Thanks for the response Jeff.

             

            I have done so in both cases but run into the same problem. I am able to import the DDL files but I cannot seem to make any type of crows feet connections and I am not sure why this is. I can do it when I recall tables from a database that I am connected to but when I try to import a DDL file from an external source the import works but no relationships are shown.

            • 3. Re: Can you create ERD's from DDL files?
              thatJeffSmith-Oracle

              does your ddl file have foreign key constraints?

               

              either way, you'll never get crow's feet in the relationships after doing an import. Once you have the import, you're in a relational model. You'll need to to then engineer to a Logical Model - then you get the 'crows feet.' I talk about this here.

              • 4. Re: Can you create ERD's from DDL files?
                2925193

                Okay thanks Jeff I will give it a try. Some of these ddl files do not have primary or foreign keys but I see columns that relate to each other which is a little confusing. I will try engineering to a logical model with the ones that do have p and f keys.

                • 5. Re: Can you create ERD's from DDL files?
                  David Last-Oracle

                  Data Modeler also has a Discover Foreign Keys option.

                  After importing the DDL file, right-click over the node for the Relational Model in the Data Modeler Browser, and select Discover Foreign Keys.

                  (If the Browser window is not visible and you are using SQL Developer, go to the View menu and select Data Modeler > Browser.)

                   

                  The Discover Foreign Keys option can be used to find hidden foreign key relationships in the model, based on column names, and create the relevant Foreign Keys.  There's more detail on the discovery options in the Help for the "Create discovered foreign keys" panel.

                   

                  When you've got your Foreign Key relationships set up, you can do the Engineer to Logical Model (using the "<<" button above the diagram or from the context menu for the Relational Model node in the Browser) to create (or update) your Entity Relationship diagram.