Back to Glossary

Query

A request for specific data from a database, API, or search engine, usually written in a structured language like SQL or GraphQL.

A query is how your application asks for data. When a user loads their profile, the app sends a query to the database asking for that user's row. When you search a glossary, the front end queries a filtered list. When an AI tool fetches context, it queries a vector database.

The most common query language is SQL (Structured Query Language), used by PostgreSQL, MySQL, SQLite, and others. Modern apps often use an ORM like Drizzle or Prisma that lets you write queries in TypeScript instead of raw SQL strings. GraphQL is another approach where the client specifies exactly which fields it needs.

For vibe coders, you rarely write queries from scratch. You describe what data you need, and AI generates the query. But understanding query structure (SELECT, WHERE, JOIN, ORDER BY) helps you verify the AI's output and catch performance issues like missing indexes or N+1 queries.

Related Courses

Links open the course details directly on the Courses page.