SQL, which stands for Structured Query Language, is a language for interacting with data stored in something called a relational database.
You can think of a relational database as a collection of tables.
A table is just a set of rows and columns, like a spreadsheet, which represents exactly one type of entity. For example, a table might represent employees in a company or purchases made, but not both.
Each row, or record, of a table contains information about a single entity. For example, in a table representing employees, each row represents a single person. Each column, or field, of a table contains a single attribute for all rows in the table. For example, in a table representing employees, we might have a column containing first and last names for all employees.
The table of employees might look something like this:
| id | name | age | nationality |
|---|---|---|---|
| 1 | Jessica | 22 | Ireland |
| 2 | Gabriel | 48 | France |
| 3 | Laurael | 36 | US |
Questions: How many fields does the employees table above contain?
- One
- Two
- Three
- Four