FileExamples
SQL500 rows

Sample SQL Database

Download a free SQL file containing a complete database schema with CREATE TABLE statements and realistic INSERT data for users, orders, products, and categories tables. Compatible with MySQL, PostgreSQL, and SQLite. Use it to test database migrations, practice SQL queries, test ORM integrations, or seed development databases.

Data Structure Preview

CREATE TABLE users (
  id INT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(100) NOT NULL,
  email VARCHAR(255) UNIQUE NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

INSERT INTO users (name, email) VALUES
('Alice Johnson', 'alice@example.com'),
('Bob Smith', 'bob@example.com');

Fields

usersordersproductscategoriesorder_items

Common Use Cases

  • Seeding development and staging databases
  • Practicing SQL queries and joins
  • Testing database migration scripts
  • Validating ORM model definitions
  • Testing database backup and restore procedures

Related Tools

Frequently Asked Questions

Which database engines is this compatible with?

The SQL syntax is compatible with MySQL 8+, PostgreSQL 14+, and SQLite 3. Minor adjustments may be needed for AUTO_INCREMENT vs SERIAL.

How many tables are included?

The file includes 5 tables: users, products, categories, orders, and order_items with proper foreign key relationships.