This is a quick tutorial on how to create ER diagram for your existing relational databases with Dataedo in just a couple of minutes.
What you get
Here's a summary of what you can gain using Dataedo for your diagrams:
- Easily create small manageable diagrams for your databases (even the large and complex ones)
- Share diagrams in interactive HTML pages easily
- Explain and document table relationships and joins, including cross-database
- Keep diagrams in sync with database schema
- Hide unnecessary information from (columns, joins)
- Keep all diagrams in a shared repository (for all databases and DBMSes)
- Build definitions and descriptions of all tables and columns in a shared repository
First, you need to download and install Dataedo on your computer.
Dataedo has two options to store metadata:
- In a local file
- In shared repository - advised (requires SQL Server)
If you want to get started with this tutorial quickly then try the file first. To create a file repository click the Create file repository button on the welcome screen.
1. Import database schema
Now you need to connect to your database and add new documentation to the repository. Click Add documentation and choose Database connection.
Now choose your DBMS, provide connection details (more on that here) and follow the wizard to import schema to the repository.
2. Create a subject area for the diagram
Diagrams in Dataedo are held in so-called "subject areas". subject areas are objects existing solely in the Dataedo repository and are used to organize databases into smaller pieces, document subject areas, or create diagrams. You can have an unlimited number of subject areas (diagrams) and diagrams can contain entities from the entire repository (you can create cross-database diagrams).
In the repository explorer subject areas & ERDs under documentation element, right click and choose Add subject area/ERD. Enter name and confirm with Enter (to change name press F2).
3. Add tables to the diagram
Now, as we have a subject area, we can start creating our ER diagram. Let's move to the ERD tab with a diagram pane and a list of available entities (on the right). This list includes all entities (tables and views) in the repository and highlights the ones linked to the ones already on the diagram and the ones assigned to this particular subject area (subject area groups tables and other objects). You can use the search field to find a specific table by its name.
To add a table to the diagram double click item on the list.
4. Choose columns to show
By default, only key columns are included in the diagram, but you can decide which columns you'd like to show. You can decide on specific columns, tables, or the entire diagram. Simply right click entity or blank diagram pane and choose one of the options:
or double click entity on the diagram to switch visibility of specific columns:
5. Add missing relations
One of the key benefits of diagrams in Dataedo is the ability to supplement table joins that have no foreign keys defined in the database. You can create manual relationships between tables (and views) that would be only preserved in the Dataedo repository (with no impact on the database).
To define a new relationship right-click the child table, choose Add relation, drag to the parent table and left-click.
And define join columns.
Manual relationships are displayed as dotted lines.
What is worth mentioning, you can document how to join tables across different databases and even engines.
Those relationships are stored globally in the repository and can be reused on other diagrams and are part of the data dictionary.
6. Hide joins
There is also an opposite functionality - to hide some links from the (specific) diagram to hide unnecessary information.
To hide the relation right-click it and choose the Hide relation option.
The effect is the following:
7. Export and share
And now, one of the key functionalities and benefits of Dataedo - exporting to interactive HTML. This is important for you because you can easily and conveniently share diagrams with complete data dictionary documentation with your team and organization.
You can also copy the diagram to the clipboard. Right-click the blank part of the diagram pane and choose Copy to clipboard option.
A few more capabilities you might be interested in:
- You can include column data types
- You can show join conditions of specific links
- You can include views on the diagrams and create joins for them as well
- You can color entities
A few tips
- Keep your diagrams small, we would suggest under 20-30 entities,
- ERDs may overlap, a table can appear on one than one ERD,
- Combine ERDs with a Data Dictionary to document and explain your databases.