QueryLab allows you to create, manage, and work with multiple PostgreSQL databases entirely in your browser using PGlite.
- Click the database selector dropdown
- Click "Create New Database"
- Enter a name for your database
- Start writing SQL to create tables and insert data
QueryLab comes with a default database containing sample data:
studentstable with example records- Perfect for learning and testing
- Click the "Import SQL" button
- Select a .sql file from your computer
- Review the import confirmation
- Confirm to replace your current database
Warning: Importing will permanently delete all data in your current database. Export first if you want to keep it!
- Standard SQL files (.sql)
- PostgreSQL dump files
- Multi-statement SQL files
- Click the "Export SQL" button
- A .sql file will download automatically
- Save the file to preserve your database
Exported files contain:
- CREATE TABLE statements
- INSERT statements for all data
- Ready to import into any PostgreSQL database
- Use the database selector in the top bar
- Select a different database from the dropdown
- Your SQL editor and results update automatically
- Each database has a unique name/key
- Names are stored locally in your browser
- You can have multiple databases for different projects
- Databases are stored in IndexedDB (browser storage)
- Data persists across browser sessions
- Each database is stored separately
- Browser storage limits apply (typically 5-10% of disk space)
- Large databases may hit storage limits
- Export important databases regularly
To clear a database:
- Export it first (if you want to keep it)
- Delete it using the database selector
- Or clear browser data (clears all databases)
- Regular Exports: Export important databases frequently
- Naming: Use descriptive names for your databases
- Organization: Create separate databases for different projects
- Backup: Keep exported .sql files as backups
- Cleanup: Delete unused databases to free space
- Refresh the page
- Check browser console for errors
- Try importing from a backup export
- Export and delete unused databases
- Clear browser cache
- Use browser settings to manage storage
- Check that the file is a valid .sql file
- Ensure the SQL syntax is correct
- Try importing a smaller file first