MySQL Basics
A database is a structured collection of records or data stored in a computer system and organized in such a way that it can be searched quickly and information can be retrieved rapidly.
The SQL in MySQL stands for Structured Query Language. This language is loosely based on English and is also used on other databases, such as Oracle and Microsoft SQL Server. It is designed to allow simple requests from a database via commands such as:
SELECT title FROM publications WHERE author = 'Charles Dickens';
A MySQL database contains one or more tables, each of which contains records or rows. Within these rows are various columns or fields that contain the data itself. Table 8-1 shows the contents of an example database of five publications detailing the author, title, type, and year of publication.
Author | Title | Type | Year |
| | | |
| | | |
| | | |
| | | |
| | | |
Each row in the table is the same as a row in a MySQL table, and each element within a row is the same as a MySQL field.
To uniquely identify this database, Iâll refer to it as the publications
database in the examples that follow. And, as you will have observed, all these publications are considered to be classics of literature, so Iâll call the table within ...
Get Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition 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.