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)

Subdividing Data Elements


In this section, we try to find out if some elements should be broken into more simple ones. The reason for doing so is that, if an element is composed of many parts, applications will have to break it for sorting and selection purposes. Thus it's better to break the elements right now at the source. Recomposing it will be easier at the application level.

Breaking the elements provides more clarity at the UI level. Therefore, at this level we will avoid (as much as possible) the well-known last-name/first-name inversion problem.

As an example for this problem, let's take the buyer's name. During the interview, we noticed that the name is expressed in various ways on the forms:

Form

How the name is expressed

Delivery certificate

Mr Joe Smith

Sales contract

Smith, Joe

We notice that

  • There is a salutation element, Mr

  • The element name is too imprecise; we really have a first name and a last name

  • On the sales contract, the comma after our last name should really be excluded...