# Database Basics

You don't need a thorough knowledge of databases to develop a data-driven ColdFusion application, but you will need to learn some basic concepts and techniques.

A database is a structure for storing information. Databases are organized in tables, which are collections of related items. For example, a table might contain the names, street addresses, and phone numbers of individuals. Think of a table as a grid of columns and rows. In this case, one column contains names, a second column contains street addresses, and the third column contains phone numbers. Each row constitutes one data record because the data in that row applies to a unique item, in this case, one individual. Rows are also referred to as records. Columns are also referred to as fields.

Data can be organized in multiple tables. This type of data structure is known as a relational database and is the type used for all but the simplest data sets.

From this basic description, a few database design rules emerge:

- Each record should contain a unique identifier, known as the primary key.

  This could be an employee ID, a part number, or a customer number. This is typically the column used to maintain each record's unique identity among the tables in a relational database.

- Once a column has been defined to contain a specific type of information, the data must be entered in that column in a consistent way.

  This is accomplished by defining a data type for the column, such as allowing only numeric values to be entered in the salary column.

- Assessing user needs and incorporating those needs in the database design is essential to a successful implementation. A well-designed database accommodates the changing data needs within an organization.

The best way to familiarize yourself with the capabilities of your database product or DBMS is to review the product documentation.