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 ...
Get PHP Advanced for the World Wide Web: Visual QuickPro Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.