Reverse Engineer an ERD – How to

Over the last few blog posts, I’ve been talking about keys – both primary and foreign. Now, we can use these to get a great ERD for all of our users.

First, let’s open up our ERD tool. In this case, we’re going to use the SQL Database Modeler – a tool I talked about in a previous post.

Database Type Choices

Since we will be reverse engineering a database, we’re going to want to do two things here:

  1. Choose the actual database type (Where does your database live) for the type of database we have. In my case, I have chosen SQL Server.
  2. Click “Bring your database”

From there, we have the following screen:

In the blue box in the middle, you’re given some simple steps to follow to get the scripts that are needed for this.

Once that is complete, you’ll upload it into the SQL Database Modeler. After a few seconds, it will generate something like below:

Reverse Engineered ERD!

These are all of the tables that exist in one specific schema – in this case, the Person schema – for our overall database. All of those FKs and PKs – that’s what we’ve been talking about for the past few posts. Because of them, this program can tell how tables are related and on what fields they’re related.

And, I don’t have to manually type out all of the items I showed you on my first post about ERDs. That’s one of my favorite things!

So, next time, we’ll go over a few more of the terms that we use with the ERDs. Until then…

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.