Column commenting

Prior to MySQL 4.1, the MySQL structure itself did not support the addition of comments to a column. Nevertheless, thanks to phpMyAdmin's metadata, we could comment on columns. However, since MySQL 4.1, native column commenting has been supported. The good news is that for any MySQL version, column commenting in phpMyAdmin is always accessed via the Structure page by editing the structure of each column. In the following example, we need to comment on three columns of the book table. Hence, we choose them and click on the pencil icon near the With selected choice.

Column commenting

To obtain the next panel, as seen here, we are working in vertical mode. This mode was covered in Chapter 5. We enter the comments as shown in the following screenshot, and then click on Save:

Column commenting

These comments appear at various places, for example, in the export file (refer to Chapter 6), on the PDF relational schema (refer to Chapter 15), and in browse mode, as shown in the following screenshot:

Column commenting

If we do not want the comments to appear in browse mode, we can set $cfg['ShowBrowseComments'] to FALSE. (It is TRUE by default.)

Column comments also appear as a tool tip in the Structure page, and column names are underlined with dashes. To deactivate this behavior, we can set $cfg['ShowPropertyComments'] to FALSE. (This one is also TRUE by default.)

Automatically migrating column comments

Whenever phpMyAdmin detects that column comments have been stored in its metadata, it automatically migrates these column comments to the native MySQL column comments.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.87.161