4.1. The Basics of MySQL Data Storage
MySQL is a relational database management system, which lets you store data in multiple tables, where each table contains a set of named columns and each row consists of a data entry into the table. Tables will often contain information about other table entries, which allows developers to group relevant information into smaller groups to ease a script's load on the server, as well as simplifying data retrieval.
For example, take a look at how you might store information about musical artists (see Tables 4-1 and 4-2).
artist_id | artist_name |
---|---|
1 | Bon Iver |
2 | Feist |
album_id | artist_id | album_name |
---|---|---|
1 | 1 | For Emma, Forever Ago |
2 | 1 | Blood Bank - EP3 |
3 | 2 | Let It Die |
4 | 2 | The Reminder |
The ...
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.