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)

Tables and Sample Values


To prepare the list of tables, we start with the physical objects or persons we can observe in the sentences built from the documents gathering phase. Then we have a look at all the elements and build new tables to accommodate them.

In the following table descriptions, the table layout is followed by design comments when appropriate.

Code Tables

Usually the following tables are designed first because they are easier to model and they are needed for establishing the relations from more complex tables.

table: airport

column name

sample value

 

*id

1

 

international_code

YUL

 

description

Montreal-Trudeau

The airport table could contain other columns like the address, phone, and website.

table: airline

column name

sample value

 

*id

1

 

description

Air-Quebec

table: plane_brand

column name

sample value

 

*id

1

 

description

Fontax

We avoid naming this table as brand because it's a too generic name.

table: meal_supplier

column name

sample value

 

*id

9

...