5.1. Planning the Entry Database Table

One of the most important steps with any new application is the planning of the tables that will hold data. This has a huge impact on the ease of scaling our application later. Scaling is the expansion of an application to handle more information and/or users, and it can be a tremendous pain if we don't look ahead when starting a new project.

At first, your blog needs to store several types of entry information to function:

  • Unique ID

  • Entry title

  • Entry text

  • Date created

Using a unique ID for each entry in the entry table enables you to access the information contained with just a number. This is extremely helpful for data access, especially if this dataset changes in the future (if you add an "imageURL" column ...

Get PHP for Absolute Beginners 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.