ER DIAGRAM [message #434837] |
Fri, 11 December 2009 03:33 |
|
ramoradba
Messages: 2457 Registered: January 2009 Location: AndhraPradesh,Hyderabad,I...
|
Senior Member |
|
|
Hi, All.
We are using erwin to generate Er diagram.
But with that tool unable to generate the ERD for specific object.
Can any one suggest on this?.
Or suggest any other tool from which i can generate the ERD of specific object.
i.e.
Lets take an example.
I have a table with one primary key and 10 foreign keys.
So now if i select the main table the tool should draw the ERD based on the Constraints ('P' and 'R') so all the different table which have the relation those table should only display.
Right now we are getting all the tables ERD(more than 1500 tables) which is not neccesary.
Sriram .
[Updated on: Fri, 11 December 2009 04:43] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: ER DIAGRAM [message #435878 is a reply to message #435864] |
Fri, 18 December 2009 08:58 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
ramoradba wrote on Fri, 18 December 2009 15:17Please ...Please...Please...Stop this.I got the solution in my way.
Nice one.
User 1: "I have an issue, can someone help me please?"
User 1: "Never mind, I found a solution"
User 2: "You might try A, that can do what you want"
User 1: "No it does not, and I got a solution"
User 2: "Why does it not do what you want"
User 1: "Please stop helping me!"
|
|
|
Re: ER DIAGRAM [message #439431 is a reply to message #434837] |
Sat, 16 January 2010 14:49 |
|
Kevin Meade
Messages: 2103 Registered: December 1999 Location: Connecticut USA
|
Senior Member |
|
|
A portable and highly flexible solution is to write a sql extractor of your own that generates a simple .SQL text file. Every tool in the world will load a text file that has CREATE TABLE and CREATE CONSTRAINT commands in it. You can write your extractor using a TABLE FUNCTION and then generate the text file via sqlplus. This makes it way easy to do.
The advantages of this are:
1) you write what ever you want. Thus to get the DDL for your child table and all its parent tables (KNOW AS A BUSH DIAGRAM), your extractor will extract DDL for only these tables based on your rules.
2) as was said, it can be used by any modeling tool and so is portable between projects and between employers.
3) your extractor routine can be as sophisticated as you like.
For example, you could extract the DDL for all tables needed to support a plsql package and then construct an ERD for this package.
Another example, you could extract the DDL for a specific complex SQL statement and then construct and ERD for that sql.
A third example, you could extract the DDL for all tables needed to support a view and then contruct the ERD for the view (very useful).
You will be hard pressed to find a diagraming tool that will do #3 above all by themselves (though there are one or two documentation tools that do it). For this reason I use this method all the time. Once you get started you will wonder why you never did it before.
A fourth example, you could build various flavors of family trees centered around a table or set of tables (known as an HOURGLASS DIAGRAM). This allows you to construct a diagram of subject areas, and diagrams that show what data is necesasry to build "CONSISTENT SNAPSHOTS" for loading data and related purposes. Basically you are building either a bush (#1 above), or an hourglass diagram with one table (or set of tables) in the middle of the hourglass.
A final example, you can combine the examples above to support other needs. For example, you identify all tables needed to support a plsql package (as via #1 above), then you identify all tables from all hourglass models for the tables you identified as necessary to your plsql package (as via fourth example above). This gives you all tables you need to load data in order to test the package successfully. You can then construct the diagram as part of your testing documentation (way cool) or as a guide to other junior developers on how to successfully test the package (way cooler because now you are getting someone else to do your work for you).
I have been doing what you are saying for 25 years for documentation purposes. It is one of the things that puts me ahead of the rest of the people I work with.
Good luck, Kevin
FYI it seems UPLOAD FILE for uploading images is not working? Where are the instructions for this? I can't find them.
Kevin
|
|
|
|