Mysql:存储mongo db文档必须使用哪种数据类型';s对象id

Mysql:存储mongo db文档必须使用哪种数据类型';s对象id,mysql,mongodb,sqldatatypes,objectid,Mysql,Mongodb,Sqldatatypes,Objectid,用例是,我在Mongodb中有一些产品数据,而在MySQL中有一些数据 因此,将驻留在MySQL中的数据是: product_skus (MySQL table) having columns - product_sku_id, product_id (this will be the ObjectId of the product document stored in Mongodb) product (Mongo Collection) _id (ObjectId - reference

用例是,我在Mongodb中有一些产品数据,而在MySQL中有一些数据

因此,将驻留在MySQL中的数据是:

product_skus (MySQL table) having columns - 
product_sku_id,
product_id (this will be the ObjectId of the product document stored in Mongodb)

product (Mongo Collection)
_id (ObjectId - referenced in product_skus table as product_id)
and some other product attributes...

要在两者之间创建连接,我需要将文档的对象id存储在MYSQL中。我应该使用哪种数据类型在MYSQL中存储objectId?

到目前为止您尝试了什么?你被困在哪里了?我正在MySQL中创建一个新表,事先需要知道哪个数据类型必须适合存储Mongo的对象id,以便链接MySQL表和Mongo文档中的数据。编辑问题以使其更清晰。您可能可以将其存储为@NicoHaase的varchar,以使问题更清晰。您是否考虑过使用新的MySQL Shell(mysqlsh)的bson导入功能-