Naming Tables and Columns

Now let’s look at some of the database design issues to considerwhen creating tables in MySQL.

The names you give your tables and their columns are important—choose them carefully. First and foremost, the names you use should be clear identifiers. Table name should indicate what data is being stored, and column names should identify what their values represent.

For example, the products table does exactly what you would expect: It contains details of the products in the database. The purposes of columns named weight and price in this table are obvious as well.

You can adopt many different naming conventions. No one convention in particular is correct, and the one you choose to use will be a matter of preference, but ...

Get Sams Teach Yourself MySQL 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.