O'Reilly logo

PHP Advanced for the World Wide Web: Visual QuickPro Guide by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Database

Once you have finished laying out the database on paper, you can start creating it with the RDBMS application itself. For the purposes of this example, I'll be using MySQL, although because of the homogenous nature of SQL, you should be able to re-create this database on any system with only minor modifications.

Before I fire up MySQL, I need to finalize all of my table and column names as well as identify what field types to use. Here are some basic rules for naming conventions:

  • Table names should be plural, indicating they contain multiple items.

  • Column names should be singular, indicating they contain a single value.

  • Use underscores for spaces.

  • List the primary key first.

  • Place other keys and indexes second.

  • Every field name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required