User Guide

Table Of Contents
447
CHAPTER 19
Introduction to Databases and SQL
Macromedia ColdFusion MX lets you create dynamic applications to access and modify data
stored in a database. You do not need a thorough knowledge of databases to develop ColdFusion
applications, but you must know some basic concepts and techniques. This chapter contains an
overview of many important database and SQL concepts.
This chapter does not contain a complete description of database theory and SQL syntax. Each
database server (such as SQL Server, Oracle, or DB2) has unique capabilities and properties. For
more information, see the documentation that ships with your database server.
Contents
What is a database? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Using SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
Writing queries using an editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
What is a database?
A database defines a structure for storing information. Databases are typically organized into
tables, which are collections of related items. You can think of a table as a grid of columns and
rows. ColdFusion MX works primarily with relational databases, such as Oracle, DB2, and SQL
Server.
The following figure shows the basic layout of a database table:
A column defines one piece of data stored in all rows of the table. A row contains one item from
each column in the table.
row
column