Design and Manage CSV Files Databases Visually with DbSchema

DbSchema lets you design, manage, and document CSV Files databases. Create ER diagrams, define tables and columns, and generate SQL scripts - with or without a live database connection.

Use Git to share the design, compare it with the CSV Files database, and deploy changes. DbSchema also includes a data editor, query builder, and HTML5 documentation - everything you need in one tool.

DbSchema Database Designer

Download DbSchema Download CSV Files JDBC Driver

Query Flat Files as Relational Tables

CSV files are the most common format for exchanging and archiving structured data, but they lack the querying and inspection tools available to relational databases. DbSchema bridges that gap by connecting to a directory of CSV files through a JDBC driver — either CsvJdbc or DuckDB — and treating each file as a queryable table. Column types are inferred automatically from file contents, and the resulting schema appears in the diagram canvas without any prior import or transformation step.

Discover Column Schemas Without Importing Data

When DbSchema connects to a CSV directory, it reads the file headers and samples rows to infer column names and data types. The schema is displayed in the diagram canvas, making it easy to review which columns exist across multiple files and how they might relate to each other before loading data into a target database.

DbSchema discovering and displaying schemas from a directory of CSV files

Browse and Filter CSV Data Visually

The data explorer renders CSV rows in a paginated grid with column-level filtering and sorting. Inspect large files without a spreadsheet application and verify that values conform to expected types before writing migration or ETL scripts.

Data explorer browsing rows from a CSV file loaded through a JDBC driver

Review and Refine Inferred Column Definitions

After auto-discovery, DbSchema lets you review and override the inferred column schema — rename columns, change data types, or mark fields as nullable. This is particularly useful when preparing a schema mapping for a migration to a structured relational database.

Editing inferred column definitions for a CSV-backed table in DbSchema

Connecting DbSchema to CSV Files

DbSchema supports two JDBC approaches for CSV files. With CsvJdbc, use the URL jdbc:relique:csv:/path/to/directory — each .csv file in that directory becomes a table. Download csvjdbc.jar from SourceForge and register it in DbSchema's driver manager. Alternatively, connect to DuckDB in-memory and use the read_csv_auto('/path/to/file.csv') function directly in the SQL editor, which gives access to DuckDB's type inference and full SQL dialect without a separate driver. For CsvJdbc, column type inference can be configured through connection properties if the defaults do not match the actual data. DbSchema also provides its own open-source CSV JDBC driver — source code available on GitHub.

Why DbSchema for CSV Exploration

  • Treat a directory of CSV files as a virtual schema — no import pipeline required.
  • Run SQL SELECT, JOIN, and aggregation queries across multiple files.
  • Inspect and override inferred column types before migrating data to a target database.
  • Browse row contents in the data explorer with column filtering and pagination.
  • Generate schema documentation from CSV-derived table definitions for data handovers.