DbSchema Design Model - The .dbs Project File Explained
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.
Quick workflow (example: MySQL → .dbs → XML)
- Connect to MySQL (or any supported database).
- Design visually: add tables, columns, indexes, and foreign keys on the diagram.
- Save the project → DbSchema creates a
.dbs
file (this is your design model, not the live database). - Work offline whenever you want; later you can synchronize the model with the database.
- (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.
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:
- Save your changes in DbSchema →
.dbs
file updates. - Commit and push to Git.
- Teammates pull and open the updated project in DbSchema.
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.
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.
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.