SQL

Theory of SQL

What is SQL?

The term SQL stands for structured query language.

SQL is a standard programming language, which focuses on processing information in relational databases through the use of queries. The programing language can store, manipulate, and retrieve data.

It is one of the most popular database languages and is vastly used in a variety of domains.

Development tools

The development tools for writing, testing, and executing of code within this series of SQL tutorials are:

Relational databases

Relational databases allow the storing and accessing of data. This type of database is very straightforward, managing data in a tabular form.

In a relational database, data is represented by tables. Each table contains rows (records) and columns (attributes). The structure provides a very straightforward and easy-to-understand concept. Each record typically has a datapoint (value) for each attribute.

RDBMS

Relational database management systems (RDBMS) refer to software, aiming at operation and management of relational databases. As such, RDBMS allow developers to write and execute SQL code.

In other words, SQL is the communication between the data and the relational database (which is managed in the RDBMS).

Please note that there are different variations of SQL through the variety of RDBMS software companies. Each version of SQL differs slightly, whether is the command name or the syntax.

Nevertheless, as a standard query language, all SQL variations have the same main commands.

SQL Syntax

The programming language of SQL has an easy-to-understand syntax.

The commands, SQL statements, use keywords similar to the English language.

Within SQL, words are not case sensitive. This means that the language does not make a difference between “CREATE” and “create”, for instance. Please note that it is a common practice within the SQL community to write in uppercase letters (e.g. “CREATE”).

In addition, each statement requires a semicolon (;) at the end. Furthermore, strings (text) in SQL uses single quotes (”). Some relational database platforms also allow double quotes (“”), but the use of single quotes is recommended.

Within the file system, SQL files have the extension “.sql” and backup database copies “.bak“.

Summary:

  • SQL is not case sensitive
  • statements require semicolon (;)
  • strings (text) require single quotes (”)
  • SQL files end in “.sql
  • Backup database files end in “.bak

Applications of SQL

The applications of SQL stretches over many sectors. As a powerful programming language, SQL offers many data related functions.

Some popular functionalities:

  • create databases
  • retrieve data
  • insert data
  • update data
  • delete data
  • execute queries

And many more.

With its strong capabilities as well as high usage popularity, SQL applies in a vast number of solutions as well as industries.

Industries and solutions

The programming language has been implemented in various sectors. Such as:

  • Finance
    – risk management
    – financial reporting
  • Healthcare
    – patient analytics
    – clinical research
  • Cybersecurity
    – incident management
    – risk detection
  • Social Media
    – user profiling
    – performance tracking
  • Marketing
    – A/B testing
    – customer segmentation
  • Data Science
    – data aggregation
    – machine learning
  • Administration
    – maintain databases
    – process confidential data

Next: SQL Data Types