# Example Schema Introduction
```
tidb> SHOW CREATE TABLE employees\G;
*************************** 1. row ***************************
 Table: employees
Create Table: CREATE TABLE `employees` (
 `emp_no` int(11) NOT NULL,
 `birth_date` date NOT NULL,
 `first_name` varchar(14) NOT NULL,
 `last_name` varchar(16) NOT NULL,
 `gender` enum('M','F') NOT NULL,
 `hire_date` date NOT NULL,
 ~!@PRIMARY KEY (`emp_no`) /*T![clustered_index] CLUSTERED */@!~,
 ~!@KEY `idx_first_name` (`first_name`)@!~,
 ~!@KEY `idx_last_name` (`last_name`)@!~
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
1 row in set (0.00 sec)
```

```
tidb> SELECT * FROM employees LIMIT 10 ORDER BY emp_no;
+--------+------------+------------+-----------+--------+------------+
| emp_no | birth_date | first_name | last_name | gender | hire_date  |
+--------+------------+------------+-----------+--------+------------+
| 10001  | 1953-09-02 | Georgi     | Facello   | M      | 1986-06-26 |
| 10002  | 1964-06-02 | Bezalel    | Simmel    | F      | 1985-11-21 |
| 10003  | 1959-12-03 | Parto      | Bamford   | M      | 1986-08-28 |
| 10004  | 1954-05-01 | Chirstian  | Koblick   | M      | 1986-12-01 |
| 10005  | 1955-01-21 | Kyoichi    | Maliniak  | M      | 1989-09-12 |
| 10006  | 1953-04-20 | Anneke     | Preusig   | F      | 1989-06-02 |
| 10007  | 1957-05-23 | Tzvetan    | Zielinski | F      | 1989-02-10 |
| 10008  | 1958-02-19 | Saniya     | Kalloufi  | M      | 1994-09-15 |
| 10009  | 1952-04-19 | Sumant     | Peac      | F      | 1985-02-18 |
| 10010  | 1963-06-01 | Duangkaew  | Piveteau  | F      | 1989-08-24 |
+--------+------------+------------+-----------+--------+------------+
10 rows in set (0.01 sec)
```

------------------------------------------------------------------------------
This lesson will use queries based on two tables, `employees` and `salaries`, for examples. 

The structure of the `employees` table is as follows:

```
tidb> SHOW CREATE TABLE employees\G;
*************************** 1. row ***************************
 Table: employees
Create Table: CREATE TABLE `employees` (
 `emp_no` int(11) NOT NULL,
 `birth_date` date NOT NULL,
 `first_name` varchar(14) NOT NULL,
 `last_name` varchar(16) NOT NULL,
 `gender` enum('M','F') NOT NULL,
 `hire_date` date NOT NULL,
 PRIMARY KEY (`emp_no`) /*T![clustered_index] CLUSTERED */,
 KEY `idx_first_name` (`first_name`),
 KEY `idx_gender` (`gender`),
 KEY `idx_last_name` (`last_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
1 row in set (0.00 sec)
```

The `employees` table is a clustered index table with `emp_no` as the primary key. It has three secondary indexes: `idx_first_name` on the `first_name` column, `idx_gender` on the `gender` column, and `idx_last_name` on the `last_name` column. Let's have a simple understanding of the data distribution in the `employees` table:

```
tidb> SELECT * FROM employees LIMIT 10;
+--------+------------+------------+-----------+--------+------------+
| emp_no | birth_date | first_name | last_name | gender | hire_date  |
+--------+------------+------------+-----------+--------+------------+
| 10001  | 1953-09-02 | Georgi     | Facello   | M      | 1986-06-26 |
| 10002  | 1964-06-02 | Bezalel    | Simmel    | F      | 1985-11-21 |
| 10003  | 1959-12-03 | Parto      | Bamford   | M      | 1986-08-28 |
| 10004  | 1954-05-01 | Chirstian  | Koblick   | M      | 1986-12-01 |
| 10005  | 1955-01-21 | Kyoichi    | Maliniak  | M      | 1989-09-12 |
| 10006  | 1953-04-20 | Anneke     | Preusig   | F      | 1989-06-02 |
| 10007  | 1957-05-23 | Tzvetan    | Zielinski | F      | 1989-02-10 |
| 10008  | 1958-02-19 | Saniya     | Kalloufi  | M      | 1994-09-15 |
| 10009  | 1952-04-19 | Sumant     | Peac      | F      | 1985-02-18 |
| 10010  | 1963-06-01 | Duangkaew  | Piveteau  | F      | 1989-08-24 |
+--------+------------+------------+-----------+--------+------------+
10 rows in set (0.01 sec)
```

From the data distribution, we can see that the `first_name` and `last_name` columns have very few duplicate values, and the indexes `idx_first_name` and `idx_last_name` have high selectivity, making them suitable for precise positioning in large amounts of data. On the other hand, the `idx_gender` index only has two values in the entire table, indicating low selectivity. Next, we will start with the best performing scan method and summarize index optimization in data query optimization.

We will explain `salaries` table later.