• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5.  Accessing Databases Using... >  Introducing Databases and Data S...

Introducing Databases and Data Sources

A database stores information, which is organized in tables. A table is a collection of related pieces of information arranged in a grid of columns and rows. For example, let’s say you want to create a table to organize employees’ identification numbers, names, and salaries. The first column contains employee identification numbers, the second has employee names, and the third has their salaries. Columns are known as fields. Each row constitutes one data record—data for a single employee. Each row is unique because it pertains to one employee. You can organize data in multiple tables. Details of each entity in the application can be stored in a different table. The employee number, which identifies each employee, is unique. This unique identifier can be used to identify and refer to each record in a table in the database and is called the primary key. The data in each column must be consistent for each record. To maintain consistency, the foreign key concept is used. For example, to store the details about the purchase order in a table, you need not store all the details about the supplier. You should only save the primary key value of the Supplier table in the Purchase Order table. The primary key of the Supplier table in the Purchase Order table is called a foreign key. This forms the basis of a relational database.

In ColdFusion, a data source is a connection between ColdFusion and an information source. Data sources added to your ColdFusion server allow you to connect to the databases from your ColdFusion applications. You can connect to a database from a ColdFusion application using a standard interface known as Open Database Connectivity (ODBC). Applications that use ODBC must have an ODBC driver installed and configured for each of the data sources.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint