May 5, 2007

Access and SQL Part 1: Setting the SQL Scene

Access and SQL Part 1: Setting the SQL Scene
This is the first in a series of tutorials demonstrating how you can use SQL to build a better database. The tutorials are not intended to be a course on SQL. There are many excellent books and online tutorials on the subject, some of which are listed below.
In this tutorial I review the various tasks that SQL is used for in Access and answer some of the questions that I asked when I started to explore the language.
What is SQL?
What is SQL for?
Can SQL do things that the Query Design tool can't?
Do I need to know SQL?
Online resources for SQL.
Books on SQL.
What is SQL?
SQL is Structured Query Language. Some people say "Ess Queue Ell" and others prefer "Sequel". SQL has been around for a while. It started life in the late 1970s when computer database designers needed a language they could use to talk to the first relational databases (ones in which the data was stored in multiple, linked tables - Access is a relational database). The first SQL standard was published by ANSI in 1986 and it has been updated several times since then. Although it is intended to be a standard language, many "dialects" exist. Microsoft Access uses a dialect called Jet SQL whereas its cousin Microsoft SQL Server uses T-SQL. But the core language is supported by many programs and is essentially simple and easy to learn.
An SQL statement might look something like this:SELECT tblStaff.* FROM tblStaff WHERE tblStaff.Gender="M";
This statement says "show me all the fields from the tblStaff table for record where the Gender field is 'M'." This is a simple example but it illustrates how easy the SQL language is to understand.
^ top
What is SQL for?

No comments: