image
Structured Query Language (SQL)

Structured Query Language

Structured Query Language (or SQL – often pronounced ‘sequel’), developed by IBM in the early 1970s is responsible for the running and manipulation of millions of databases across the globe. The nature of SQL fits well with ASP and PHP systems and, as such, is widely used to interrogate databases for the development of dynamic web pages.

SQL is:

  • Used to interrogate databases
  • Utilises several elements
    • Clauses – constituent components of statements and queries
    • Expressions – produce either scalar values or tables consisting of columns and rows of data
    • Predicates – specify conditions that can be evaluated to SQL three-valued logic or Boolean (true/false/unknown) truth values
    • Queries – retrieve the data based on specific criteria. This is the most important element of SQL
    • Statements – control transactions, program flow, connections, sessions or diagnostics

Web applications can be built to interrogate databases using SQL and return search results for users.

ASP and PHP scripts can be written to interrogate a database with SQL and create web pages according to search criteria or context (e.g., what a user has visited before).

SQL environment

The SQL environment consists of a data definition language and a data manipulation language. The data definition language is used to define the database framework of tables, fields, and relationships. Typical commands within the data definition language are CREATE, DROP, and ALTER. The data manipulation language is used to manage the data within the database. Typical commands within the data manipulation language include SELECT, INSERT, DELETE, and UPDATE.

Security concerns

Care must be taken when using SQL databases with HTML webpage front ends to avoid malicious manipulation of the database by specially crafted SQL commands passed through the HTML input form. This type of attack is commonly called an SQL injection, which means that SQL code is deliberately injected to the database via the web form. Catastrophic results can occur if such actions are allowed.

Difficulty
Beginner
Duration
32m
Students
829
Ratings
4.7/5
starstarstarstarstar-half
Description

In this Course, you’ll further explore the web protocols that underpin the internet and the world wide web, and some of the applications they enable.

About the Author
Students
38979
Labs
161
Courses
1559
Learning Paths
39

A world-leading tech and digital skills organization, we help many of the world’s leading companies to build their tech and digital capabilities via our range of world-class training courses, reskilling bootcamps, work-based learning programs, and apprenticeships. We also create bespoke solutions, blending elements to meet specific client needs.