2.1.3 Mapping MySQL Database Object Names and Types to NDB

Abstract

This section discusses NDB naming and other conventions with regard to database objects.

Databases and Schemas.  Databases and schemas are not represented by objects as such in the NDB API. Instead, they are modelled as attributes of Table and Index objects. The value of the database attribute of one of these objects is always the same as the name of the MySQL database to which the table or index belongs. The value of the schema attribute of a Table or Index object is always 'def' (for default).

Tables.  MySQL table names are directly mapped to NDB table names without modification. Table names starting with 'NDB$' are reserved for internal use>, as is the SYSTAB_0 table in the sys database.

Indexes.  There are two different type of NDB indexes:

Names of unique indexes and primary keys are handled as follows:

Column Names and Values.  NDB column names are the same as their MySQL names.

Data Types.  MySQL data types are stored in NDB columns as follows: