Chapter 6. Working with Database Structures

This chapter shows you how to create your own databases, add and remove structures such as tables and indexes, and make choices about column types in your tables. It focuses on the syntax and features of SQL, and not the semantics of conceiving, specifying, and refining a database design; you’ll find an introductory description of database design techniques in Chapter 4. To work through this chapter, you need to understand how to work with an existing database and its tables, as discussed in Chapter 5.

This chapter lists the structures in the sample music database used in this book; detail on how to load the database is presented in Chapter 2. If you’ve followed those instructions, you’ll already have the database available and know how to restore the database after you’ve modified its structures.

When you finish this chapter, you’ll have all the basics required to create, modify, and delete database structures. Together with the techniques you learned in Chapter 5, you’ll have the skills to carry out a wide range of basic operations. Chapters 7, 8, and 9 cover skills that allow you to do more advanced operations with MySQL.

Get Learning 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.