MySQL is a database. A database defines a structure for storing information.
In a database, there are tables. Just like HTML tables, database tables contain rows, columns, and cells.
Databases are useful when storing information categorically. A company may have a database with the following tables: "Employees", "Products", "Customers" and "Orders".
A database most often contains one or more tables. Each table has a name (e.g. "Customers" or "Orders"). Each table contains records (rows) with data.
Below is an example of a table called "Persons":
The table above contains three records (one for each person) and four columns (LastName, FirstName, Address, and City).
A query is a question or a request.
With MySQL, we can query a database for specific information and have a recordset returned.
Look at the following query:
SELECT LastName FROM Persons
The query above selects all the data in the LastName column in the Persons table, and will return a recordset like this: