Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

SQL Intro

What is SQL?

  • The acronym SQL represents Structured Query Language.
  • SQL facilitates database access and manipulation.
  • SQL attained standardization by the American National Standards Institute (ANSI) in 1986 and by the International Organization for Standardization (ISO) in 1987.

What Can SQL do?

  • SQL has the capability to execute queries against a database.
  • SQL can retrieve data from a database.
  • SQL can insert records into a database.
  • SQL can update records within a database.
  • SQL can delete records from a database.
  • SQL is capable of creating new databases.
  • SQL can create new tables within a database.
  • SQL enables the creation of stored procedures within a database.
  • SQL allows the creation of views within a database.
  • SQL can establish permissions on tables, procedures, and views.

SQL is a Standard – BUT….

While SQL adheres to the ANSI/ISO standard, various versions of the language exist. Nonetheless, to ensure compliance with the ANSI standard, all versions typically support the fundamental commands (like SELECT, UPDATE, DELETE, INSERT, WHERE) in a consistent manner.

Note: Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard!

Using SQL in Your Web Site

To construct a website displaying data from a database, you’ll require the following:

  • A relational database management system (RDBMS) program, such as MS Access, SQL Server, or MySQL.
  • Implementation of a server-side scripting language, such as PHP or ASP.
  • Utilization of SQL to retrieve the desired data.
  • Application of HTML/CSS to format the page.

RDBMS

RDBMS stands for Relational Database Management System, serving as the foundation for SQL and all contemporary database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.

Data within an RDBMS is organized into database objects known as tables. Each table represents a collection of related data entries, structured into columns and rows.

Consider the “Customers” table:

Example

SELECT * FROM Customers;

Each table is divided into smaller components known as fields. Within the Customers table, the fields encompass CustomerID, CustomerName, ContactName, Address, City, PostalCode, and Country. A field, serving as a column in a table, is intended to retain specific details about each record within the table.

A record, often referred to as a row, represents each individual entry within a table. For instance, the Customers table mentioned above consists of 91 records. A record can be seen as a horizontal entity within a table.

On the other hand, a column is a vertical entity within a table that encompasses all the information related to a specific field within that table.