public function getXMLDBKeyName($type) {

        $result = '';

        switch ($type) {
            case XMLDB_KEY_PRIMARY:
                $result = 'primary';
                break;
            case XMLDB_KEY_UNIQUE:
                $result = 'unique';
                break;
            case XMLDB_KEY_FOREIGN:
                $result = 'foreign';
                break;
            case XMLDB_KEY_FOREIGN_UNIQUE:
                $result = 'foreign-unique';
                break;
            // case XMLDB_KEY_CHECK:  //Not supported
            //     $result = 'check';
            //     break;
        }
        // Return the normalized name
        return $result;
    }