Our Design Patterns for Organizing Database Diagrams

The importance of having a clear and organized representation of your database structure.

The importance of having a clear and organized representation of your database structure.

Poom Wettayakorn

Jun 6, 2024

Jun 6, 2024

data-modeling

👋 Hi there, welcome to Datascale: SQL+Data modeling. We help create database diagrams and map out data models from existing schema and SQL queries 🌱. Find us on LinkedIn 🎉

Recap what's new

Datascale 1.1 - Saving diagram state after rearrangement is now available in 🐧 Datascale 🧊

At first, we designed our pattern for organizing SQL in collections and SQL cards. SQL cards are a way to group related queries and schemas, as shown in the cover image. Thus, it'd be easy enough to visualize 5-10 tables in one digram.

We use auto arrangement to format the diagram (i.e., topological sorting for DAG and lineage). However, for discrete use cases like ER diagram, we still need some manual organizations.

Now, in this update, you can save diagram positions after rearrangement. The positions are synced across your team in the same workspace. 🎉

// Related LinkedIn post

Our design patterns

We understand the importance of having a clear and organized representation of your database structure.

"SQL isn’t just code; it’s the fundamental unit of your data."

In this blog post, we'll share a bit of the design patterns and explore how they can benefit your SQL+database management process. These patterns include:

  • Grouping related queries and schemas in SQL collections and cards

  • Auto diagram arrangement for data lineage use case

  • Manual organization for discrete use cases like ER diagrams

1. Collections: Logical Grouping for SQL Assets

Datascale's collections serve as a directory structure. It allows you to group related SQL queries and schemas. This logical grouping enhances workspace organization. We have also suggested PARA method for organizing SQL queries. Learn more here:

Here's an example of PARA method used in our team:

2. SQL Cards: Targeted Visualization for Modular Development

SQL cards provide a granular level of organization by grouping related queries and schemas to visualize a set of tables within a single diagram.

This feature is particularly beneficial when developing or debugging specific database modules or features.

What's next?

This visualization is just for one SQL card. Next, I'll share how we start to model multiple SQL queries and generate more complete diagrams from your entire database system.

Our goal is to provide users with a seamless and intuitive experience when working with database diagrams. Whether you're working on a specific feature or exploring the entire database structure, Datascale's design patterns ensure that your diagrams are organized, informative, and easy to collaborate on. Stay tuned ✌️


Related blogs

Contents

Section

Model your database diagram

Datascale helps map out data models from existing schema and SQL queries

Try for free

Data Modeling for SQL

Data Modeling for SQL