Skip to main content

Databases: Querying

Databases
Querying
    • Notifications
    • Privacy
  • Project HomeTools and Techniques in Software Engineering
  • Projects
  • Learn more about Manifold

Notes

Show the following:

  • Annotations
  • Resources
Search within:

Adjust appearance:

  • font
    Font style
  • color scheme
  • Margins
table of contents
  1. Introduction to Databases
  2. Relational Model
  3. Organizing Information
  4. Querying
    1. Example with SQLite
    2. Example with Google Sheet Query
  5. Joins
  6. Products
  7. Bibliography

Querying

A query language allows users to manipulate and retrieve data from a database. While it supports easy access to large data sets, a query language is not a programming language for complex applications. Understanding algebra and calculus is key to understanding SQL.

SQL** is a declarative programming paradigm. The acronym is a shortened version of SEQUEL, which stands for Structured English Query Language. SQL is a standard language for accessing and manipulating databases.

Although SQL is an ANSI/ISO standard, there are different versions of the SQL language. Each database product may have slight variations to data types and query syntax, but for the most part the logic behind expressions is largely the same. To be compliant with the ANSI standard, they all support at least the major commands (such as SELECT, UPDATE, DELETE, INSERT, WHERE) in a similar manner.

The format of a query is:

SELECT  <column>
FROM <table>;

The uppercase is not required, it is for readability.

Examples of selecting a column

Selecting a column

Selecting specific rows

Learning SQL Queries

Here are some places to learn more about SQL queries.

  • Khan Academy
  • SQL Zoo
  • Postgres Exercises

Annotate

Next Chapter
Example with SQLite
PreviousNext
Powered by Manifold Scholarship. Learn more at
Opens in new tab or windowmanifoldapp.org