private String getDatabaseNameByDevice(IDeviceID deviceID) {
    for (String storageGroup : dataPartitionMap.keySet()) {
      if (PathUtils.isStartWith(deviceID, storageGroup)) {
        return storageGroup;
      }
    }
    // TODO: (xingtanzjr) how to handle this exception in IoTDB
    return null;
  }
For table model usage.

<p>The database shall start with "root.". Concat this to a user-provided db name if necessary.

<p>The device id shall be [table, seg1, ....]
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/DataPartition.java