Chapter 3: Designing and Building a Database

In This Chapter

arrow.png Planning your database

arrow.png Designing a sample database

arrow.png Constructing your database

arrow.png Restructuring your database

The first step in creating a database is to design it. You design a database before you ever put finger to keyboard to create that database. Planning is perhaps the most important step. It’s very painful to discover after you build the database and put it in service that it doesn’t contain all the data or provide the relationships between data that you need, so in this chapter we give you some tips for designing a database that will work well for you.

After completing your database design, you’re ready to build that database, and we tell you how to do that too, later in the chapter. You create the database and its tables according to the design you developed. When it’s built, you have a useful, empty database, waiting for you to fill it with data. You can then read about adding and retrieving data in Chapter 4 of this minibook.

Designing a Database

Designing the database includes identifying the data that you need ...

Get PHP, MySQL, JavaScript & HTML5 All-in-One For Dummies 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.