MapInfo Native TAB

Native TAB is the most common of the TAB forms. Native extended TAB (NativeX) is the same as native TAB, except it supports very large files (> 2 GB) and multiple languages. Both forms of native TAB exhibit the same behavior.

Spectrum Spatial treats native TAB as a read-write data source; however, operations for insert, update, and delete are applicable only for Windows operating systems and for non-clustered systems.

Data Types

Spectrum Spatial supports geometry types in native TAB files: Point, MultiPoint, Linestring, MultiLineString, Polygon, MultiPolygon and MultiFeatureGeometry. The following are the mappings from TAB data types to Spectrum Spatial equivalents.

TAB Data Type Spectrum Spatial Data Type
OBJ Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection.

Rectangle, rounded rectangle, ellipse, arc, and text object supported as rendering only constructs.

integer Integer
smallint Short
float Double
decimal Double
char String
largeint Long
integer64 Long
date Date
time Time
datetime Date_Time
logical Boolean

Primary Key

Native TAB has an implied primary key that is the row ID. This column does not appear in the data, similar to the ROWNUM in Oracle.

Insert, Update, and Delete Support

Insert, update and delete operations are supported on a native TAB data source provider, with these limitations:

  • A setting is available in Spectrum Spatial™ Manager when creating and editing named tables to allow enabling or disabling of the read-only attribute for qualifying TAB files (native and NativeX in Windows) for which a user has the appropriate permissions. This does not take into account, however, whether the TAB file metadata has a read-only flag or is read-only on the file system.
  • These operations are supported only on a single instance of a Spectrum™ Technology Platform installation. They are also not supported on a clustered environment because either there would be multiple copies of the file (on each node, resulting in the files becoming inconsistent) or a file share is in use. For performance and scalability in a clustered environment, RDBMS-based data sources such as SQL Server, PostGIS, or Oracle should be used for writing. Native and NativeX TAB files are not intended to be used in the same manner as databases.
  • These operations are supported only where the TAB file is local to the Spectrum™ Technology Platform instance. They are not supported if the TAB file is on a network share. This is due to performance and unreliability of write access over file shares for TAB files.
  • Reading from a TAB file using the Read Spatial Data or Query Spatial Data stage and performing an update or delete on the same TAB file using the Write Spatial Data stage in the same flow is not recommended, because in some cases it creates a deadlock situation (where the read operation locks the file preventing the write operation). This will work only if the commit interval is greater than the number of records reading from same TAB. Also, if there is a long-running insert, update, or delete operation in a data flow and there are read operations from a service for the same TAB file (for example, from the Mapping, Feature, or Map Tiling services), then some read requests might fail as the TAB file could be locked.
  • When using the Feature Service for write operations on native TAB files, all read requests for that file will wait until the write operation is complete. More than one read request can be executed concurrently for the same TAB file, and a write request will wait until all the read requests are completed for a TAB file.
  • Multi-process write access to a native TAB file will not be permitted (for example, writing to a TAB file cannot occur if another tool such as MapInfo Pro is also trying to read it). The write operation will result in failures and the TAB file will become inconsistent or corrupt.

MI SQL Optimizations

The native TAB data source provider contains optimizations for these MI SQL constructs:

For more information see the appendix Delegation to Data Source Providers.

Data Source Volatility

Volatility for a native TAB data source means any change to the table's schema or records as evidenced by a change in timestamp. When volatility is enabled (true), the data source provider will cache information about a specific TAB group of files. It compares the time stamps of the cached information against the time stamp of the files being accessed. If they are different, the information is flushed from the cache and reloaded.

The following native TAB files are checked for volatility: .TAB, .DAT, .MAP.

Insert, update, and delete operations are allowed on both volatile and non-volatile native TAB files. When making a TAB file available for write access, it is recommended to also enable volatility.

See Data Source Volatility for more information.

File Handle Pool

If your native TAB files do not change frequently, set the volatility to false and take advantage of a file handle pool that minimizes the file opening and closing during operations. This is only available to non-volatile native and seamless TAB files and shapefiles.

For non-volatile tables, file handles will be released from the pool before performing any insert, update, or delete operation. This only applies to native TAB files because seamless TAB files and shapefiles are read only.

The file handle pool is enabled by default. Configuration of the file handle pool is done through the Management Console. Among the properties are the maximum number of handles that can be allocated to the pool (maxTotal), the maximum number of allocated handles per file (maxTotalPerKey), and the minimum length of time a file handle can sit in the pool unused before being closed (minEvictableIdleTimeMillis). Statistics for the file handle cache for shapefiles can be viewed in the JMX Console (for more information, see Monitoring File Handle Caching Statistics with the JMX Console in the Administration section of the Spectrum Spatial Guide).

To turn the file handle pool off:

  1. Open a web browser and go to http://server:port/managementconsole

    Where:

    server is the IP address or hostname of your Spectrum™ Technology Platform server.

    port is the HTTP port used by Spectrum™ Technology Platform. The default is 8080.

  2. Log in using the admin account.
  3. From Resources, click Spatial.
  4. Double-click on the value beside the pool.file.enabled property and type false.
  5. Click Save.

The remote component (JVM instance) automatically restarts with the change. This setting applies to native and seamless TAB files and shapefiles.