Book Image

Creating your MySQL Database: Practical Design Tips and Techniques

By : Marc Delisle
Book Image

Creating your MySQL Database: Practical Design Tips and Techniques

By: Marc Delisle

Overview of this book

For most of us, setting up the database for an application is often an afterthought. While you don't need to be a professional database designer to create a working application, knowing a few insider tips and techniques can make both the process easier and the end result much more effective. This book doesn't set out to make you an expert in data analysis, but it does provide a quick and easy way to raise your game in this essential part of getting your application right.
Table of Contents (12 chapters)

Data as a Column's or Table's Name


Now is the time to uncover what is perhaps the least known of the data naming problems: data hidden in a column's or even a table's name.

We had one example of this in Chapter 1. Remember the qty_2006_1 column name. Although this is a commonly seen mistake, it's a mistake nonetheless. We clearly have two ideas here, the quantity and the date. Of course, to be able to use just two columns, some work will have to be done regarding the keys—this is covered in Chapter 4. For now, we should just use elements like quantity and date in our elements list, avoiding representing data in a column's name.

To find those problematic cases in our model, a possible method is to look for numbers. Column names like address1, address2 or phone1, phone2 should look suspicious.

Now, have a look in Chapter 2 at the data elements we got from our store assistant. Can you find a case of data being hidden in a column name?

If you have done this exercise, you might have found many past...