You are in: Products > HoneyMonitor > Reference Manual > On-line Consultation >



41.5 Fields

A Column is a set of data values of a particular type, one for each row of the table. The Columns provide the structure according to which the rows are composed. The term Field is often used interchangeably with Column, although many consider it more correct to use field (or field value) to refer specifically to the single item that exists at the intersection between one row and one column.

Creating a Field
To create a Field:
  1. open the ''Server Object List'' (chap. 16);
  2. expand the ''Tables'' node relating the database which contains the table you want to create the field in;
  3. double click on the table name;
  4. click on the ''Fields'' Tab of the ''Table Editor'' (sec. 41.4);
  5. click on the ''Add Field'' button (or right click and select the ''Add Field'' item from the popup menu);
  6. use the ''Field Editor'' (sec. 41.5.1).

Editing a Field
To edit a Field:
  1. open the ''Server Object List'' (chap. 16);
  2. expand the ''Tables'' node relating the database which contains the table which contains the field you want to edit;
  3. double click on the table name;
  4. click on the ''Fields'' Tab of the ''Table Editor'' (sec. 41.4);
  5. in the fields' grid select the row relating the field you want to edit;
  6. click on ''Edit selected Field'' button (or double click or right click and select the ''Edit Field'' item from the popup menu);
  7. use the ''Field Editor'' (sec. 41.5.1).

Dropping a Field
To drop a Field:
  1. open the ''Server Object List'' (chap. 16);
  2. expand the ''Tables'' node relating the database which contains the table you want to drop the field from;
  3. double click on the table name;
  4. click on the ''Fields'' Tab of the ''Table Editor'' (sec. 41.4);
  5. in the fields' grid select the row relating the field you want to drop;
  6. click on the ''Drop selected Field'' button (or right click and select the ''Drop Field'' item from the popup menu);
  7. confirm the requested operation.

Multi-Drop of Fields
To drop a set a fields of a table:
  1. open the ''Server Object List'' (chap. 16);
  2. expand the table node relating the database which contains the table you want to drop the fields from;
  3. right click on the ''Fields'' node and select the ''Multi-Drop of Fields'' item from the popup menu;
  4. use the ''Multi-Drop Wizard'' (chap. 26).


41.5.1 Field Editor

The Field Editor allows you to create and edit table fields. The caption of the Editor reports if you are adding or editing a field.

The ''Editor'' (Fig. 41.35) can be opened from the Create Table Wizard, from the Table Editor or using the popup menu of the Server Objects List (see the introduction of the sec. 41.5).

See Also:

  •  41.1.2: Create Table Wizard, Fields Step
  •  41.4.1: Table Editor, Fields Tab
  •  41.6.1: Index Editor
  •  41.7.1: Foreign Keys Editor
  •  41.8.1: Trigger Editor
  •  41.9.2: Partition Editor


Figure 41.35: The Field Editor.
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/general.jpg


41.5.1.1 Name and Type

Set the field name and choose the field data type (Fig. 41.36).

Figure 41.36: Field name and type.
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/name_and_type.jpg


41.5.1.2 Properties

You may set some field flags like unsigned or zerofill (Fig. 41.37).

Figure 41.37: Field properties.
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/field_flag.jpg


41.5.1.3 Dimension

Set the dimension for the field from the ''Field Dimension'' frame.

This frame changes according to the data type of the field; you may click on the information icon at the right to get information about the field data type.

For example, for an INT field the ''Field Dimension'' frame is like that in Fig. 41.38.

Figure 41.38: Field dimension (INT data type example).
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/int_dimension.jpg

For a DECIMAL data type, the frame is like that in Fig. 41.39.

Figure 41.39: Field dimension (DECIMAL data type example).
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/decimal_dimension.jpg

For a TEXT data type, the frame is like that in Fig. 41.40.

Figure 41.40: Field dimension (TEXT data type example)
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/text.jpg

For a LONGBLOB data type, the frame is like that in Fig. 41.41.

Figure 41.41: Field dimension (LONGBLOB data type example).
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/longblob.jpg

For a LONGTEXT data type, the frame is like that in Fig. 41.42.

Figure 41.42: Field dimension (LONGTEXT data type example).
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/longtext.jpg


41.5.1.4 Values

The ''Field Values'' frame (Fig. 41.43 and 41.44) allows you to set:
  1. the list of values for an ENUM or SET data type;
  2. the default value for a field.

Note: you can manually write the comma separated list of values for an ENUM or SET data type (e.g. 'value_1','value_2',...,'value_n') or you can click on button at the right and use the ''Value List Editor'' (Fig. 41.5.1).

Figure 41.43: Field Value.
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/values.jpg

Figure 41.44: Default value for a TIMESTAMP field.
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/timestamp_defaults.jpg


41.5.1.4.1 Value List Editor

The Value List Editor (Fig. 41.45) allows you to set the values for an ENUM or SET data type.

Write a value and click on the ''Add value'' button; when done click on the ''Ok'' button.

Figure 41.45: Value List Editor.
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/field_values.jpg


41.5.1.5 Charset

The ''Field Charset'' frame (Fig. 41.46) allows you to set the field charset and collation for the CHAR, VARCHAR and TEXT data type.

See Also:
  •  6.3.1: Client, Results and Connection Charset and Collation
  •  27.7: Server Charset and Collation
  •  37.1: Database Charset and Collation
  •  41.2.2: Table Charset and Collation

MySQLTM chooses the column character set and collation in the following manner:
  • If both CHARACTER SET X and COLLATE Y were specified, then character set X and collation Y are used.
  • If CHARACTER SET X was specified without COLLATE, then character set X and its default collation are used.
  • Otherwise, the table character set and collation are used.

Note: if you leave the ''Default'' value, the charset and collation clauses are not included in the create or edit field query and the charset and collation for that field are the charset and collation of the table the field belongs to.

Note 2: your server version should be higher than 4.0 to set charset and collation.

Figure 41.46: Field Charset and Collation.
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/charset.jpg


41.5.1.6 Insert Options

The ''Insert Options'' frame (Fig. 41.47) allows you to set in which position (first, last, or after of) the field has to be inserted.

Figure 41.47: Advanced Insert Options.
http://www.honeysoftware.com/products/honeymonitor/doc/images/tablesmanagement/ENG/field/insert_option.jpg



Copyright © 2007 - 2009 HoneySoftware - All Rights Reserved

Submit feedback on this topic.






Lingue Disponibili:
    Inglese >>
    Italiano >>

Risorse Disponibili:
    Download >> Acquista >> HoneySoftware EULA >>
    Supporto Tecnico >>    

Ulteriori Risorse::
    Richiesta CD >>

 

Notizie Flash:




Possiamo aiutarti?


Chatta con noi!

Scarica Skype e Chatta con noi!
Marchio di Accettazione PayPal

Area Clienti:

User Id
Password
 

Awards:

HoneyMonitor Received "User Choice" Award at Free Download Manager

Twitter:


Follow HoneySoftware on Twitter!

Seguici @ Twitter!

Chi Siamo | Mappa del sito | Dati Personali | Contattaci || © 2007 - 2010 HoneySoftware - webmaster@honeysoftware.com. Best viewed with 1024*768 p.r. or higher.