text, image, and unitext datatypes  Initializing text, unitext, and image columns

Chapter 1: System and User-Defined Datatypes

Data structures used for storing text, unitext, and image data

When you allocate text, unitext, or image data, a 16-byte text pointer is inserted into the row you allocated. Part of this text pointer refers to a text page number at the head of the text, unitext, or image data. This text pointer is known as the first text page.

The first text page contains two parts:

Once an first text page is allocated for text, unitext, or image data, it is never deallocated. If an update to an existing text, unitext,or image data row results in fewer text pages than are currently allocated for this text, unitext, or image data, Adaptive Server deallocates the extra text pages. If an update to text, unitext, or image data sets the value to NULL, all pages except the first text page are deallocated.

Figure 1-1 shows the relationship between the data row and the text pages.

Figure 1-1: Relationship between the text pointer and data rows

This figure shows the relationship between the text pointer and data rows.

In Figure 1-1, columns c_text and c_image are text and image columns containing the pages at the bottom of the picture.





Copyright © 2005. Sybase Inc. All rights reserved. Initializing text, unitext, and image columns

View this book as PDF