FloorPlan: Visualize database evolution

Easier peer reviews and documentation-as-code

At SoundCloud, we are around 20 Android engineers, working in a multi-module project with more than 10 databases, with multiple tables each. And that’s only the Android app!

As software matures, more functionality is added, code gets moved, re-written or removed. In the same rhythm, team members change and with them historical knowledge might get lost. For that reason, it is important to have a well-organized project, that is inviting for new contributors while still digestible for one-off readers.

Understanding how data is structured can be very helpful as an initial step for diving into the abstract modeling of the business domain. Database schemas, then, provide that entry window, but building the mental model out of a machine-readable format can be a daunting task even for seasoned engineers, especially when the project grows large and changes rapidly.

Enter FloorPlan

It is distributed as a CLI tool and as a Gradle Plugin, for manual interaction and integration with CI environments.

Sample usage of FloorPlan’s Gradle Plugin

Check out the full documentation and sample plugin integration.

Versioning 🗒️

By using git, developers can iterate on proposed schema changes, easily review them and also bring in non-technical peers by lowering the learning curve into database technologies.

Code review 🔎

In the spirit of full automation, these can then be written as pull request comments after a CI build:

Documentation 📝

At SoundCloud, we host an internal documentation portal, completely based on markdown files, that now can automatically include diagrams for our client application databases as pull requests are merged:

Extensibility 🗜️

On the Android space, for instance, there are many popular libraries to communicate with SQLite, each providing a different feature-set, that FloorPlan can integrate with.

That doesn’t make its usage Android-specific, though, since a Consumer for MySQL, Postgres or Oracle could also be built by leveraging these RDBMS’s schema exporting tools. In fact, one can work with already existing tools to use DBML itself as an input to FloorPlan.

Try it out

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store