2 Replies Latest reply: May 15, 2013 6:01 PM by SM_Work RSS

    Modeler Display Tables and Relationships ...

    SM_Work
      Ok, so ... I'm reverse-engineering a section of our DB, so as to draw out the tables and constraints.
      (using SQL Dev Version 3.2.20.09.87)

      I don't want a logical model, I don't want DDL, I just want a picture ... table-layout with relationship lines.
      (a fancier and neater napkin drawing, really)

      Ok, so ... I get the table list, I right-click on the "Relational Model" entry and choose "Create Display" ...
      And it makes a holy mess of 25 tables. I try to straighten it out. Ugh.
      Then I figure, I'll delete the darn thing, and start over manually.

      BUT I CANNOT GET RID OF IT.
      I thot at one point I had a blank canvas, and started to lay out the the two major branches of those 25 tables ... and then I scroll to another part of the screen ... and there are the darn tables again, AND the views I had also asked it to import ... which have no bearing on laying out the tables.

      So then I think, I'll just delete these one-by-one, and I try that and it asks me to verify, do I want this table gone?
      And I say, NO ... I do not. I want that table. I just don't want the display any more ... or want said table on the display.

      I try in the "Display" section under the relational model to delete THAT "Display[1]" item, but no, every time I say "New Display" there's all the old garbage.

      So ... now I am thorougly confused: HOW DO I GET RID OF THE DARN LAYOUT???? While keeping the tables?
      What I want is to lay out the tables (because I know intimately how they relate to one another), and then click something, e.g., "Auto-Route"??? ... and have it draw the relation lines, and then I straighten these, and then I am done.

      But I cannot figure out what to click. The manual is no help.
      All I want is a picture.
      I am going to give up and go back to ODBC connector in MS Access, wheren I can just lay out the tables in the relationships window, and I will be done in 10 minutes.

      What am I doing wrong?

      Thanks for your time.

      SM
        • 1. Re: Modeler Display Tables and Relationships ...
          Jeff Smith Sqldev Pm-Oracle
          , I just want a picture ... table-layout with relationship lines. (a fancier and neater napkin drawing, really)
          Gotcha

          Ok, so ... I get the table list, I right-click on the "Relational Model" entry and choose "Create Display" ... And it makes a holy mess of 25 tables. I try to straighten it out. Ugh.
          Why create a display instead of working with the default relational diagram you get after doing your data dictionary import?

          The general gist around displays is to use them if you want an alternate visual display of your default diagram(s)
          http://www.thatjeffsmith.com/archive/2013/02/oracle-sql-developer-data-modeler-using-displays/
          Then I figure, I'll delete the darn thing, and start over manually.
          Delete what exactly, the display or your model altogether?
          What I want is to lay out the tables (because I know intimately how they relate to one another), and then click something, e.g., "Auto-Route"??? ... and have it draw the relation lines, and then I straighten these, and then I am done.
          So you do not have foreign keys, you are adding the relationships manually? And then after doing so, you want a widget to better arrange the objects on the diagram? We can't draw the relationship lines for you without no referential integrity defined in the model or the database (FKs) - but we can guess or infer relationships based on column names. Not sure if that's what you're looking for?
          something, e.g., "Auto-Route"??? ... and have it draw the relation lines,
          Maybe this is what you want? Right click in relational model diagram, and go with Auto-Layout (1-4). This does a 'best guess' layout in 4 different attempts to make the diagram as readable as possible.
          • 2. Re: Modeler Display Tables and Relationships ...
            SM_Work
            Ah ... I did not know there was a "default diagram" ...
            Nor what the routes did. Nor did I try the auto-layouts.
            And yes, there are all kinds of keys between these tables.

            (and, as to "Delete what" ... well ... the drawing.
            I did not assume the drawing and the table descriptions "were one" ...
            but I read your display link, I get this kinda, now)

            OK, so ... now I see in the relational diagram, the four tables I manually added.
            So I do not need them, they are dupes. So I click and say delete and it says ...
            "CDHObjects has more than one graphical representation" (duh, I know!!)
            And the buttons say ... Remove Object. Remove View. Cancel.

            I scratch my head.
            Why doesn't it say "Remove duplicate graphical representation"???
            I click Remove View. Who knows what that does?
            It says "Delete Table: CDHOBJECTS" ... more confusion. I had clicked removeview_

            I did NOT want to delete one of my main tables!!!
            But I haul around the rest of the diagram, and lo! The original version is still there.
            So ... what did I do? Very unclear, altho' outcome is OK.

            SO ... I do fool around with "Auto Layout" as you suggest
            (1 seems better than the other 3, so I will re-arrange that one).

            And now I finally see ... it has ASSUMED that since the unique column in all of our code tables is "CCODE" that these fields must be related to each other! That they are an odd soup of FKs.
            It does not know that years and years ago, we created all of our code tables "the same way" so we could join them in a super-view and manage them all via one form. Ah.

            OK, now I am good, I think ... am getting closer to the napkin drawing.
            Thanks, Jeff, for your time / help (I do like your "ThatJeffSmith" newsletter).

            [These tables are  a small, nearly autonomous chunk/subsystem of a much larger system ... used for containing docs, objects, tasks to do for next object version, question / answer section for users, with audit trail for changes and keyword or topic searches (meta-metadata in some ways, about the DB as a whole) ... I use it as our teaching model for Apex, because it is so well contained, and so clear, when an intern has done a correct Apex version of what we already have in Oracle Forms .... i.e., "here's how you build a new interface on "old" tables / structures" ... much better (for me) than "Emp-Dept" ... and we connect the help to various forms, and can / will do the same when we flesh out our Apex interface (thus building a context-rich user-definable/extendable documentation area that never gets dusty and we don't have to maintain in binders).]

            Kind regards,
            SM