# Transform between Relational Data and Kv (Continue...)

![left](./student-guide/diagram/02-09-01.png)
------------------------------------------------------------
 Since every table in the entire database may have a primary key with numbers 1, 2,..., n, so in order to locate a row in the database, we need to add the Table ID to the Key, which is the unique number of the table and the index ID. In this way, a row of data has a global key at the database level. What about tables that don't have a primary key? TiDB will actually add a hidden column RowID to all relational tables. If the table has int Primary Key, the value of the Primary Key will be used as the RowID, otherwise the Row ID will act as the Primary Key, where the TableID is unique in the whole cluster, indexID/ RowID is unique within the table, and these IDs are all int64 types.