DbSchema Database Designer

DbSchema Design Model - The .dbs Project File Explained



Understanding the .dbs Project File in DbSchema

When you create a project in DbSchema, everything is saved in a special file with the extension .dbs. This file is your design model - independent of your database, shareable, and easy to version in Git.

But before we get into .dbs, let’s quickly understand what it’s made of: XML.


1. What is XML?

XML stands for eXtensible Markup Language. It’s a way to describe data using tags, similar to HTML, but focused on storing structured information.

  • Text-based: you can open it in any text editor.
  • Human-readable: you can understand the structure at a glance.
  • Machine-readable: tools and applications can parse it easily.

Here’s a simple XML example:

<Student>
   <ID>1</ID>
   <Name>Alice</Name>
   <Email>[email protected]</Email>
</Student>

This format is flexible, portable, and widely used for saving data models.

2. What is a .dbs File?

In DbSchema, your entire design project — tables, relationships, diagrams, and layouts - is saved in a .dbs file.

Git Workflow

Quick workflow (example: MySQL → .dbs → XML)

  1. Connect to MySQL (or any supported database).
  2. Design visually: add tables, columns, indexes, and foreign keys on the diagram.
  3. Save the project → DbSchema creates a .dbs file (this is your design model, not the live database).
  4. Work offline whenever you want; later you can synchronize the model with the database.
  5. (Optional) Open the .dbs as XML in Notepad/VS Code if you want to inspect or edit the raw model.
  • It contains your model, not the live database itself.
  • You can design offline without being connected to a server.
  • Because it’s XML inside, you can open it with Notepad, VS Code, or any text editor.

Example (simplified) from a .dbs file:

<Table name="Customers">
   <Column name="customer_id" type="INT" primaryKey="true"/>
   <Column name="name" type="VARCHAR(100)"/>
   <Column name="email" type="VARCHAR(100)"/>
</Table>

2.1 Multiple Diagrams & Layouts in One Project

A single .dbs file can hold multiple diagrams/layouts of the same schema.

Create a focused view for Customers & Orders, another for Inventory, etc.

All of them live together in the same project file and stay in sync with the model.

DbSchema ER Diagram


3. Why Is It Independent?

The .dbs file is not tied to one database engine. You can design once and then deploy the model to MySQL, PostgreSQL, Oracle, MongoDB, or any of the 70+ supported databases.

  • Work Offline: design on the plane, in class, or without a running server. You can go live whenever you want, and synchronize with the live database.
  • Multiple databases: the same model can be deployed to different database engines.

4. How Git Fits In

Because .dbs is just XML, you can store it in Git like you would source code.

  • Every time you make a change (add a table, modify a column), Git tracks it.
  • You and your teammates can collaborate, merge changes, and review history.

Example Git workflow:

  1. Save your changes in DbSchema → .dbs file updates.
  2. Commit and push to Git.
  3. Teammates pull and open the updated project in DbSchema.

Git Workflow


5. Schema Comparison & Synchronization

Your .dbs model can be compared with a live database to see what changed on either side. DbSchema highlights differences (tables, columns, indexes, foreign keys) and helps you synchronize:

  • Update the database from the model (generate/apply SQL).
  • Update the model from the database (pull live changes).
  • Review changes before applying them.

Schema Compare

6. Generate Documentation from the Model

Because the .dbs file contains the full design (tables, columns, foreign keys, indexes, and comments), DbSchema can generate documentation directly from it:

  • HTML5 interactive docs (open in any browser).
  • PDF for static sharing.
  • Markdown for wikis and repositories.

This keeps documentation consistent with your design and easy to update.

HTML5 Documentation


7. Key Takeaways

  • .dbs is your design project file in DbSchema.
  • It’s XML-based - readable, editable, and Git-friendly.
  • A single project holds multiple diagrams/layouts.
  • You can work offline and deploy to many databases.
  • Use Schema Comparison to keep model and database in sync.
  • Generate HTML/PDF/Markdown documentation straight from the model.

Next time you save your work in DbSchema, remember: You’re not just saving a diagram - you’re saving a complete, independent model that’s easy to share, version, document, and reuse.

Download now for free, and try it yourself.

Visual Design & Schema Diagram

➤ Create and manage your database schema visually through a user-friendly graphical interface.

➤ Easily arrange tables, columns, and foreign keys to simplify complex database structures, ensuring clarity and accessibility.

GIT & Collaboration
Version Control & Collaboration

➤ Manage schema changes through version control with built-in Git integration, ensuring every update is tracked and backed up.

➤ Collaborate efficiently with your team to maintain data integrity and streamline your workflow for accurate, consistent results.

Data Explorer & Query Builder
Relational Data & Query Builder

➤ Seamlessly navigate and visually explore your database, inspecting tables and their relationships.

➤ Build complex SQL queries using an intuitive drag-and-drop interface, providing instant results for quick, actionable insights.

Interactive Documentation & Reporting
HTML5 Documentation & Reporting

➤ Generate HTML5 documentation that provides an interactive view of your database schema.

➤ Include comments for columns, use tags for better organization, and create visually reports.