2.3.18 The NdbDictionary Class NdbDictionary Methods


This class provides meta-information about database objects, such as tables, columns, and indexes.

While the preferred method of database object creation and deletion is through the MySQL Server, NdbDictionary also permits the developer to perform these tasks through the NDB API.

Parent class.  None

Child classes.  Dictionary, Column, Object

Description.  This is a data dictionary class that supports enquiries about tables, columns, and indexes. It also provides ways to define these database objects and to remove them. Both sorts of functionality are supplied using inner classes that model these objects. These include the following inner classes:

Additional Object subclasses model the tablespaces, logfile groups, datafiles, and undofiles required for working with MySQL Cluster Disk Data tables (introduced in MySQL 5.1), as well as foreign keys (MySQL Cluster NDB 7.3 and later).


Tables and indexes created using NdbDictionary cannot be viewed from the MySQL Server.

Dropping indexes through the NDB API that were created originally from a MySQL Cluster causes inconsistencies. It is possible that a table from which one or more indexes have been dropped using the NDB API will no longer be usable by MySQL following such operations. In this event, the table must be dropped, and then re-created using MySQL to make it accessible to MySQL once more.

Methods.  NdbDictionary itself has no public instance methods, only static methods that are used for working with NdbRecord objects. Operations not using NdbRecord are accomplished by means of NdbDictionary subclass instance methods. The following table lists the public methods of NdbDictionary and the purpose or use of each method:

MethodPurpose / Use
getEmptyBitmask()Returns an empty column presence bitmask which can be used with NdbRecord
getFirstAttrId()Get the first attribute ID specified by a given NdbRecord object
getRecordIndexName()Gets the name of the index object referred to by an NdbRecord
getRecordRowLength()Get the number of bytes needed to store one row of data using a given NdbRecord
getRecordTableName()Gets the name of the table object referred to by an NdbRecord
getRecordType()Gets the RecordType of an NdbRecord
getValuePtr()Returns a pointer to the beginning of stored data specified by attribute ID, using NdbRecord
isNull()Show whether the null bit for a column is true or false
setNull()Set a column's null bit

NdbDictionary Subclass Hierarchy.  This diagram shows the hierarchy made up of the NdbDictionary class, its subclasses, and their enumerated data types:

Diagram showing relationships of the NdbDictionary class, its subclasses, and their enumerated data types.

For the numeric equivalents to enumerations of NdbDictionary subclasses, see the file /storage/ndb/include/ndbapi/NdbDictionary.hpp in the MySQL Cluster source tree.