Databases are collections of tables. Tables are a bit like files, although they work very differently. You might prefer to think of them as analogous to the worksheets in a spreadsheet. Each table has a name.
A Joomla database has numerous tables. Extensions often add their own tables. A few of the core Joomla tables are:
xxx_content
xxx_content_frontpage
xxx_content_rating
xxx_extensions
. . .
We can take a good guess at what most of these tables are used for. The xxx_ here is the database table name prefix configured when the site is installed.
Each table can contain many rows, rather like the rows on a spreadsheet, and each row can contain many columns. Each column has a name, which describes the data item it holds. Rows don't have names, although in Joomla they usually have an id number that uniquely identifies them.
Here's an extract from the xxx_content table:
| id | title | alias | . . . | hits |
|---|---|---|---|---|
| 1 | Welcome | welcome | 496244 | |
| 2 | Article 1 | article1 | 39945 | |
| 3 | Article 2 | article2 | 467777 |
We don't need to know what most of these columns are for to notice that two of them look as though they could be useful to us: the "Title" and "Hits" columns. We will make use of these in our first chart. Columns are sometimes referred to as fields. The columns and their names are defined by the author of the software that creates or uses the table. The rows are usually added at runtime by using the software.
We usually want to ask the database to get certain rows for us based on the data they contain - the row for a particular order number, for example, or perhaps all the rows for all the orders on a particular date. The data that comes back from such a request is called a result set, or a dataset. In charting, we also refer to it as a data series.