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 quickly searched and information can be rapidly retrieved.
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 contain 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.
The Adventures of Tom Sawyer
Pride and Prejudice
The Origin of Species
The Old Curiosity Shop
Romeo and Juliet
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 the database that holds the details classics ...