How to visualize the relationship of tables in an Oracle database - database

I know in Access there is a way I can visualize the relationship between tables in a diagram - kind of like an ER diagram.
I am new to Oracle. I am wondering if I can do the same/similar thing with Oracle. Could someone give some suggestions?

Oracle SQL Developer Data Modeler - Tool recently launched by Oracle.
Schemaspy is good if you require an offline easy to navigate html report.

Oracle don't provide a tool for free. Their SQL Developer Modeler is pretty good but price-y if you need to buy a commercial license.
If you are interested in platform independence then Power Architect is FOSS.

Download Oracle Data Access Components (ODAC), which is usually packaged with Oracle Developer Tools for Visual Studio. Follow the install instructions for the Oracle ODBC driver. Add a System DSN (Start > Run > type odbcad32 press ENTER).
No you can open an entity-relationship diagram through MS Access, MS Visio, Visual Studio, Enterprise Architect, or other ODBC-compliant data tools.
For example, in MS Access: File > Open > Under "Files of type", select ODBC Databases. This selection is at the bottom of the drop-down list. Select "Database Tools" tab, then "Relationships" to view the Oracle table relationships. Here is a link to an article where Oracle provides documentation on how to visualize the relationships during a migration from Access.
In MS Visio, choose FILE > NEW > "Software and Database" > "Database Model Diagram". Then select "Database" from the top menu, and "Reverse Engineer". Select the ODBC connection. If you get an error, hit escape. Continue until the diagram is loaded.
Enterprise Architect and Visual Studio offer much better capabilities, having similar instructions.
Hope that is clear and helpful. Merry Christmas!

There is no inbuilt tool, but you can use some free ware, or even buy some of these if you really like them.
https://stackoverflow.com/questions/674911/light-weight-er-diagram-tool
Good tool to visualise database schema?
My personal favorite is ER/Studio

Oracle Sql Developer is free and have Query builder which can display diagram. You can drag and drop tables from list of tables in schema.

You can connect Access to Oracle via ODBC. Then display the oracle tables in access.

Related

How can I generate an entity–relationship (ER) diagram of a database using Microsoft SQL Server Management Studio?

I want to generate an ER diagram of an SQL database using Microsoft SQL Server Management Studio (SMSS). However, I don’t know how to.
I found this technique online: Making ER Diagram from SQL Server 2008 Database
However, I am not able to see "Database Node" or "Database Diagrams" nodes as mentioned in the first and second steps.
Hence, how can I generate an ER diagram from an existing database?
From the comments, I realize that I was right in my understanding that Database node means the node with my database name. But then my problem is I am not able to find the "Database Diagrams" node under my Database name. What should I do so that I can see it?
PS: It’s not a local database.
Go to SQL Server Management Studio →
Object Explorer →
Databases →
Choose and expand your database.
Under your database, right click on "Database Diagrams" and select "New Database Diagram".
It will a open a new window. Choose tables to include in the ER diagram (to select multiple tables, press Ctrl or Shift key and select tables).
Click Add.
Wait for it to complete. Done!
You can save the generated diagram for future use.
Diagrams are back as of the 2019-06-11 release
Download the latest
As stated:
Yes, we’ve heard the feedback; Database Diagrams is back.
SQL Server Management Studio (SSMS) 18.1 is now generally available
Note: The latest version does not include it
Sadly, the last version of SSMS to have database diagrams as a feature was version v17.9.
Since that version, the newer preview versions starting at v18.* have, in their words "...feature has been deprecated".
Hope is not lost though, for one can still download and use v17.9 to use database diagrams which, as an aside for this question, is technically not an ER diagramming tool.
As of this writing it is unclear if the release version of 18 will have the feature. I hope so because it is a feature I use extensively.
From Object Explorer in SQL Server Management Studio, find your database and expand the node (click on the + sign beside your database). The first item from that expanded tree is Database Diagrams. Right-click on that and you'll see various tasks including creating a new database diagram. If you've never created one before, it'll ask if you want to install the components for creating diagrams. Click yes then proceed.
As of 2019-10, for SQL Server Management Studio, they did not upgrade it to add the create ER Diagram feature.
I would suggest try using DBeaver:
I am using both Mac and Windows and I was able to download the community edition. I logged into my SQL server database and was able to create the ER diagram using the DBeaver.

how to create a database diagram in sybase

I am new to sybase. IS there a way to create a database diagram as in SQLServer Management Studio.
Thanks
PowerDesigner is sold by Sybase, with integration to (create objects in a target database) and from (reverse-engineer a database) Sybase ASE.
However it is immature and clunky. Originally built for Oracle, integrated to the lowest levels of detail, and not yet completely to that point with Sybase.
The best tool for modelling databases is ERwin. It happens to have better integration with Sybase, as well as a slew of features for enterprise modelling that PowerDesigner does not have. It is very mature, and implements the Relational Modelling Standard (IDEF1X).
Both are expensive. But there are other options:
if all you need is a diagramming tool, anything will do (OmniGraffle; ABCFlowCharter; VS). Then do your database administration in SybaseCentral (free from Sybase) or DBArtisan or various other offerings.
You can also model in SQLServer Management Studio; produce a DDL file; then import that into Sybase. That requires resolving the difference between Sybase and MS SQL syntax. No big deal if you are not specifying low level (physical) elements.
I think that the best tool is Sybase PowerDesigner (Database Architect edition).
As far as I remember one license is included in ASE.

Automating reverse engineer database model with Visio

We develop and maintain our database schema with a custom tool. SQL scripts and runtime files are generated from that tool. However, it does not provide a very good visual representation.
Lately I been using Visio to reverse engineer the schema. This is working great so far. But to be able to do this, I need to:
create an empty database
execute the generated script
start up visio
choose reverse engineering and choose the created database
select all tables, etc
wait for generation
I really want to automate this process. Step 1 and 2 are easy, but how can I automate the other steps.
I've been looking for a C# library to create Visio diagrams, but they al seem not suitable for this task.
For instance
http://visioautomation.codeplex.com/ and http://www.graphviz.org/ look promising, but on a closer look they were not appropriate.
I've tried to record macro, but the macro recorder does not work in conjuction with the reverse engineering tools.
Michiel,
I am using Visio 2007 and SQLite 3.
Tonight I had a crack at reverse engineering my Sqlite3 database with success. The key is to download an ODBC driver for Sqlite. I found some here > http://www.ch-werner.de/sqliteodbc/. I installed the current one at the top of the list "sqliteodbc.exe".
Then the MSVisio set up was a bit muddled so forgive me if I do not explain the details in an exact, repeatable format.
The new installed ODBC driver should appear in Visio when you select: Database > Reverse Engineer > Setup.
Scroll down and check one of the three Sqlite drivers - I chose the "SQLite3 ODBC Driver"
Then click on "New" > Check "System Data Source" > Scroll down select "SQLite3 ODBC Driver" > Click "Finish"
On the dialog that it entitled "ODBC DNS Configuration" is where you enter your Sqlite database settings. The "Database Name" is simply the path and file name of your database.
The "Data Source Name" can be anything meaningful to you as it will appear in the Visio dropdown whenever you want to reverse engineer. There are some other settings you can experiment with as well.
When you commence reverse engineering you will be asked to connect to your datasource using your credentials. At this point you will get a warning ...
Warning! You are using a Visio
'ODBC Generic Driver' to connect
with a 'SQLite' DBMS datasource. By using
an incompatible driver, it is possible
that the catalog information retrieved
will be incomplete.
Just click 'OK' and ignore this.
Unfortunately, in the next screen the option to select "Views" and "Triggers" are greyed out (you can select Tables: Primary Keys, Indexes, Foreign Keys though). This is a shame as I have defined a lot of these in my schema and I have benefited from rev-enging these in Oracle many times in the past.
That is it. Hope someone can find a fix for rev-enging the views.
Dan
Have you tried using the "Refresh" feature? I'm not sure if that is a 2010 thing or if it was always there. You point it at the database and it updates your model with the changes since last time.

Data Model tools for DB2

I have created a Database in DB2 and tables with relationships. I would like to create a ER diagram based on my database design in DB2. MS SQL has a facility to create ER diagrams from DB schema, but DB2 doesn't seem to have one, at least to my knowledge.
Any one know of any open source tools/facility within DB2 itself for this?
You could try TOAD for DB2 (freeware and commercial versions).
Download here
Also IBM Data Studio looks promising.
DbVisualizer can visualize (and much more) just about any database, provided that the relevant foreign keys have been defined. DbVisualizer isn't open source, but there is a free edition of it (which isn't limited regarding visualization).
You can use Visio and do a database reverse engineering. I have done it and found it to be quite neat.
Reverse engineer an existing database into a database model
TOAD for DB2 freeware does not have the ER diagramming feature enabled. It is available only in the commercial version. ER Studio is another (expensive) option. Try Visio 2000 Enterprise edition if you can get one. It is available on ebay for about $35. Microsoft has moved the reverse engineering option in subsequent version of Visio to the expensive enterprise architect bundles.
Aqua Data Studio has an ER Modeling tool which will work with any RDBMS. You can create, explore, detail, and modify database schemas to create fully editable and scriptable diagrams of database relationships and objects. The link to download is www.aquafold.com

Which tool can help generate a SQL server 2005/2008 database from E-R diagram?

In Visio 2003 Architect version I can generate a SQL Server Database on the fly from UML ER diagram. But there is no such a way by using Visio 2007. My question is: Any other good and latest tools can support ER-> DB or DB->ER very well for SQL2005/2008?
I think Enterprise Architect can do that too.
http://www.sparxsystems.com.au/
You can do the ER diagram on Visual Studio creating a dbml file and then export to a Sql Server script using the huagati plugin. http://www.huagati.com/dbmltools/
If you're looking for a free/open source tool to achieve this, you could try:
DBDesigner
From the website:
DBDesigner 4 is a visual database design system that integrates database design, modeling, creation and maintenance into a single, seamless environment.
It combines professional features and a clear and simple user interface to offer the most efficient way to handle your databases.
DBDesigner 4 compares to products like Oracle's Designer©, IBM's Rational Rose©, Computer Associates's ERwin© and theKompany's DataArchitect© but is an Open Source Project available for Microsoft Windows© 2k/XP and Linux KDE/Gnome. It is release on the GPL.
And it supports the following features:
Available on Linux / MS Windows
User Interfaced based on industry standard layouting software
Design Mode / Query Mode
Reverse engineering MySQL, Oracle, MSSQL and any ODBC databases
Userdefined schema-generation
Model-To-Database syncronisation
Index support
Automatic foreign key placement
Weak entity support
Standard Inserts storing and sync
Full documentation capabilities
Advanced model printing
Output as image
All MySQL datatypes with all options
User defined datatypes
Database storage, ability to save model within database
Network-/Multiuser access through database storage
Version control*
SQL Query Builder
SQL Command History
SQL Command storage within model
Plugin interface
I think the bolded ones above (my own emphasis) should give you what you require (i.e. effectively two-way database/model synchronization).
I have used the tool in the past to reverse engineer an existing database to an ER diagram. From what I remember, it wasn't the most stable software I'd ever used (I seem to recall it crashed a couple of times) however, this was a little while ago so it may be more stable now.
I remember that in Visio 2003 that was only possible, I believe in the Enterprise Edition. Could that be your issue with 2007?
Most of the tools don't handle SQL 2005/2008 correctly. But CA ERwin® Process Modeler does the best job (at a cost though).
There is a community edition but it is limited to 25 objects per model.
Give it a try and let us know.

Resources