Статьи

Начало работы с DbSchema в распределенной базе данных SQL

If you’re a database developer, you know the time-saving value of being able to visually design, document and query SQL and NoSQL databases from a single UI. DbSchema is a well-rounded, visual database tool that supports over 40 databases from a single interface. And because YugabyteDB is PostgreSQL compatible, getting DBSchema to work with a distributed SQL database is relatively simple.

In this post, we’ll show you how to get DbSchema connected to a YugabyteDB cluster so you can start reverse-engineering schemas, edit ER diagrams, browse data, visually build queries and even sync schemas.

What’s YugabyteDB? It is an open source, high-performance distributed SQL database built on a scalable and fault-tolerant design inspired by Google Spanner. Yugabyte’s SQL API (YSQL) is PostgreSQL wire compatible.

You may also like: Continuous Integration and Continuous Delivery for Database Changes

What Is DbSchema?

DbSchema boasts many of the must-have features you’d expect from a database GUI tool including:

  • Interactive Layouts — Divide complex schemas into separate layouts (groups of tables) for a better representation of the database. Use the layouts to browse and edit the schema visually, without having to write any SQL queries.
  • Relational Data Browse — Use this simple tool to view data from multiple tables simultaneously, based on foreign keys. There is no limit to how many tables can be opened at once.
  • Random Data Generator — Generate test data in your database using configurable, random and reverse regular expression patterns. A predefined repository of patterns will help you find the best data pattern for each column.
  • Visual Query Builder — Build SQL Queries visually, without having to write any line of code. Add and edit tables with a simple click.
  • Connect to any Database and Reverse Engineer the Schema — Start a new project by reverse engineering the schema. Save the schema structure to the project file and you can reopen it without database connection.
  • Schema Synchronization — DbSchema is using its own image of the schema saved to the project file. This enables you to open and modify the schema offline, then synchronize it when you connect to the database.

Ok, let’s dive in and get Dbschema installed and connected to a YugabyteDB cluster!

Step 1: Install a Local YugabyteDB Cluster

Before we get into DbSchema, you’ll need to setup YugabyteDB and install a sample database. Although for the purposes of this blog post we’ll be installing everything on a macOS, both YugabyteDB and Dbschema support most major operating systems.

For complete instructions on how to get up and running on a variety of platforms including prerequisites, check out our Quickstart Guide. In the following section, we’ll cover the basic steps for getting up and running in just a few minutes with a local 3 node cluster on your Mac laptop.

Download and Extract YugabyteDB

Shell