# Mapping between Key and Value of tables
+ Clustered Index: User
  + ID is a primary key
+ Insert 3 rows of data
+ Mapping between Key and Value

```
~!@-- Clustered Index: User@!~
CREATE TABLE User (
 ID INT NOT NULL PRIMARY KEY CLUSTERED,
 Name VARCHAR(20),
 Role VARCHAR(20),
 Age INT,
 KEY idxAge (Age)
);

~!@-- Insert 3 rows of data@!~
INSERT INTO User VALUES (1, "TiDB", "SQL Layer", 10);
INSERT INTO User VALUES (2, "TiKV", "KV Engine", 20);
INSERT INTO User VALUES (3, "PD", "Manager", 30);

~!@-- Mapping between Key and Value@!~
t10_r1 --> ["TiDB", "SQL Layer", 10]
t10_r2 --> ["TiKV", "KV Engine", 20]
t10_r3 --> ["PD", "Manager", 30]
```

----------------------------------------------------
There is real world case for mapping between key and value of Clustered Index Table.
Create a clustered table T:
```
CREATE TABLE User (
 ID INT NOT NULL PRIMARY KEY CLUSTERED,
 Name VARCHAR(20),
 Role VARCHAR(20),
 Age INT,
 KEY idxAge (Age)
);
```

Insert 3 rows of data:
```
INSERT INTO User VALUES (1, "TiDB", "SQL Layer", 10);
INSERT INTO User VALUES (2, "TiKV", "KV Engine", 20);
INSERT INTO User VALUES (3, "PD", "Manager", 30);
```

In the code, we can observe that the ID column is the primary key column, and we have declared the CLUSTERED keyword, indicating that this is a Clustered Index Table. If we do not declare the CLUSTERED keyword, the TiDB database will still create a Clustered Index Table by default.

Based on the provided pseudo code, we can write the following corresponding relationships:
t10_r1 --> ["TiDB", "SQL Layer", 10]
t10_r2 --> ["TiKV", "KV Engine", 20]
t10_r3 --> ["PD", "Manager", 30]

As we can see, for example, in the Key: t10_1, t10 represents the table ID and _1 represents the primary key value, which is the ID column of the table. The Value: ["TiDB", "SQL Layer", 10] obviously represents the values of the other columns.