Interview for Database Design Fundamentals
"Database Design Fundamentals" interview with Selene Bainum
Michael Smith: This time we are talking with Selene Bainum about her CFUNITED-05
talk "Database Design Fundamentals". So why should a developer come to your
session Selene ?
Selene Bainum: Databases are the foundations of many ColdFusion applications.
Like anything you build, the completed product can be no stronger than the
foundation on which it stands. However, many developers may not understand how
or why to build a properly structured database. This session will explain how
to build a database from the ground up, and explain why concepts like
normalization, relationships and table keys are important.
MS: What about designing the database tables and indices? Will you cover that?
SB: Absolutely. The main focus of this class is to teach developers how to design their tables so
that their application is stored in the most efficient way possible. Creating tables, keys and
indices will be covered in-depth.
MS: BTW what is normalization?
SB: Normalization is technique to designed databases which removes repeated data from the tables.
The ultimate goal is to create related tables that have no redundant data and can be easily modified
and/or added to.
MS: And how do relationships and keys fit into that?
SB: Relationships allow data sets to be broken up into multiple tables, thus removing repeated data.
There is typically a parent table and a child table Keys are created to formalize these
relationships, allowing data integrity. Primary keys are the unique identifier of the parent table
while a forgeign key is the parent's primary key value within the child table.
MS: Sounds complex - what is an example of a key?
SB: A primary key is a part of a row/element which is unique - it cannot be duplicated for any
other row. This key could be one or more columns combined, but its value cannot change. Often keys
are created dynamically, such as using a number automatically generated by the database and has no
meaning to the rest of the row. This is typical because it can be quite difficult to isolate a part
of your row that is unique and will not change. Even Social Security Numbers could change.
MS: What can we do to make our applications run faster?
SB: The correct structure and indice are important. As is the way you write
your SQL statements and the use of parameters. . Most ColdFusion developers get to a point where their
applications need to run more efficiently than they have before. The first
thing anyone should try to improve is interactions with their database. By
moving logic from ColdFusion to your database, such as SQL Server, you can
greatly increase the efficiency and speed with which your applications run.
My "Advanced SQL" session will cover some of the ins and outs of Transact-SQL, SQL
Server's specific flavor or SQL, which will allow you to create complex queries
and stored procedures that include concepts such as variables, conditional
logic, loops and cursors.
MS: Will you have any sample code or demos in your session?
SB: My design fundamental session will contain some code samples. The SQL used to create tables and
keys is presented as well as ColdFusion code that shows how to insert, delete and select data from