SQL's Place in the Data Center
So how does SQL actually fit into the solution to my data management problems? We discussed earlier
that SQL did not have a front end (user interface) or a back end (DBMS). So in the next few sections we
will discuss some "ends" that we can use as well as the protocols that create a bridge across which the
SQL statements flow.
"How Do I Get SQL? "
You need a front end that can connect to a SQL-enabled DBMS and can pass a SQL statement. We will
talk more about connections in Chapter 2, but for now consider a connection to be a conduit for
carrying SQL statements between the front and back ends. A connection is like the apparatus of the
telephone company that connects your handset to your friend's handset it allows a language to be used
to communicate. Third, you need a SQL-enabled DBMS. You probably already have a SQL-enabled
front end and a DBMS in one form or another (see the sections below). And if you don't you can get an
inexpensive version or a trial version that will allow you to get started learning SQL for free.
Keep in mind that since SQL is a standard in the public domain, you do not need software or a license
to use the language. You can acquire SQL by simply learning the syntax of how to write the SQL
statements. But in order to practice creating and running SQL statements you will need three parts:
- a front end
- a connection
- a back end
We will look in detail at various options for each of these, but let us start with a quick overview.
The front end provides a means to send a SQL statement. Usually the front end includes an interface to
users with a form to gather data and buttons to carry out tasks. The front end may contain a fixed SQL
statement or it may use code to create a statement on the fly using the data provided by the user. The
most common type of front end is the web browser.
The connection provides a conduit to get the SQL statement to the back end and then to return results
to the front end. The connection is like a telephone connection over which a spoken language travels,
although the language itself is free. A common connection today is ADO (Activex Data Objects) but
there are many other options.
The back end is a DBMS that accepts and can act on SQL statements. Usually the back end has two
parts, the actual store of data and a database engine, which can carry out the SQL statement. The most
common back ends are the major database products such as Oracle and Microsoft SQL Server.
The included CD contains a front end, connection and back end, but in a less
conventional arrangement than the one we have just described. The CD is a 120-day
trial version of Microsoft SQL Server 2000. SQL Server provides a very strong back
end, but it does not come with front end or connection software. However, there is a
utility called Query Analyzer which comes with SQL Server. This tool provides a front
end optimized for developers that want to test SQL statements. It is a very simple
front end that allows you to type a SQL Statement, run it and then view the results. A
normal front end would have tools for creating a polished interface for users, but
Query Analyzer is aimed at developers that are testing. Built into Query Analyzer is
connection software that automatically creates a connection when the developer
selects which database to work with.