# Mapping between Key and Value of tables

+ Mapping between Key and Value of Clustered Index
```
Key: TableID_col1~!@<PK>@!~
Value: [col2, col3, col4]
```
+ Mapping between Key and Value of Nonclustered Index
```
Key: TableID_RowID
Value: [col1, col2, col3, col4]
```

----------------------------------------------------
According to the content we just learned, we know that there are two ways to create tables in the TiDB database: Clustered Index tables and Nonclustered Index Tables.
Let's summarize these mapping methods using pseudocode:
1. Mapping method for Clustered Index Tables:
```
Key: TableID_col1<PK>
Value: [col2, col3, col4]
```
Here, col1, col2, col3, and col4 represent the columns in the table, with col1 being the primary key column.
2. Mapping method for Nonclustered Index Tables:
```
Key: TableID_RowID
Value: [col1, col2, col3, col4]
```
Here, col1, col2, col3, and col4 represent the columns in the table. RowID is an implicit column assigned by TiDB and is a 64-bit signed integer (BIGINT).