SQL (Structured Query Language)
SQL files contain database queries and schema definitions in the Structured Query Language. SQL is the universal language for relational databases — querying data, defining tables, inserting records, and managing transactions in PostgreSQL, MySQL, SQLite, and more.
MIME Type
application/sql
Type
Text
Compression
Lossless
Advantages
- + Universal language supported by every relational database
- + Declarative syntax — describe what you want, not how to get it
- + Powerful JOIN, aggregation, and window functions
- + ACID transactions ensure data integrity
Disadvantages
- − Dialect differences between PostgreSQL, MySQL, SQLite, etc.
- − Not suited for unstructured or graph data
- − Complex queries can be hard to read and optimize
When to Use .SQL
Use SQL for database queries, schema migrations, data exports, stored procedures, and any relational database interaction.
Technical Details
SQL operates on relational data using declarative statements: SELECT for queries, INSERT/UPDATE/DELETE for manipulation, CREATE/ALTER for schema, and GRANT/REVOKE for permissions. Each database engine adds proprietary extensions.
History
IBM researchers Raymond Boyce and Donald Chamberlin created SQL in the early 1970s. It was first standardized as ANSI SQL in 1986 and has been revised multiple times (SQL-92, SQL:1999, SQL:2023).