# Mapping between Key and Value of tables

+ Nonclustered Index: User
  + ID is primary key
+ Insert 3 rows of data
+ Mapping between Key and Value


```
~!@-- Nonclustered Index: User@!~
CREATE TABLE User (
  ID int not null PRIMARY KEK NONCLUSTERED,
  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_r001 --> [1, ”TiDB”, "SQL Layer", 10]
t10_r002 --> [2, ”TiKV", "KV Engine", 20]
t10_r003 --> [3, ”PD", "Manager", 30]
```

----------------------------------------------------
Next, let's look at an example of a Nonclustered Index Table. The table User is as follows:
```
CREATE TABLE User (
 ID int not null PRIMARY KEY,
 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, although the ID is a primary key column, we have declared the NONCLUSTERED keyword, indicating that this is a Nonclustered Index Table. If we do not declare the NONCLUSTERED keyword, the TiDB database will create a Clustered Index Table by default when the ID is not a primary key.We can understand it like this: If there is no primary key column in the table, only a Nonclustered Index Table can be created. If there is a primary key column in the table, unless the NONCLUSTERED keyword is added, a Clustered Index Table will be created by default.
Similarly, based on the provided pseudocode, 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: t11_r001, t11 represents the table number, and _r001 is the implicit RowID assigned by TiDB, which is not the ID primary key column in the table. The Value: [1, "TiDB", "SQL Layer", 10] obviously includes the values of all columns.