In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The data rows of the table have the general structure shown in figure 6-5 (as long as the data is stored in an uncompressed form). This format is called the FixedVar format because data for all fixed-length columns is stored first, followed by data for all variable-length columns. Tables 6-7 show the information stored in each FixedVar row.
Status bit A contains a bitmap that indicates the attributes of the row. These bits have the following meanings:
Bit 0 represents special version control information. In SQL server 2012, this is always 0.
Bits 1 through 3 as 3-bit valu
0 (000) represents the master record
1 (001) indicates the forwarded record
2 (010) indicates forwarding stub
3 (011) indicates an index record
4 (100) indicates a BLOB fragment or row overflow data
5 (101) represents the virtual shadow index record
6 (110) indicates virtual shadow data record
7 (111) indicates the phantom version record.
Bit 4 indicates that there is an empty bitmap. In SQL server 2012, null is not allowed even in any column
There is always an empty bitmap.
Bit 5 indicates that there are variable length columns in the row.
Bit 6 indicates that the row contains versioning information.
Bit 7 is not used in SQL server 2012.
The only bit used in the status bit B field indicates that the record is a phantom forwarded record.
You can see in figure 6-5 and Table 6-7 that the third and fourth bytes indicate the length of the fixed-length portion of the row. As shown in figure 6-5, its length does not include the number of 2-byte columns and empty bitmaps, depending on the total number of columns in the table, which is of variable length. Another way to interpret the data in these bits is to find the location of the number of columns in the row. For example, if the third and fourth bytes (bytes 2-3) contain the value 0x0016 (that is, decimal 22), it means that the row not only has 22 bytes before the value of the number of columns, but also means that the value of the number of columns can be found in byte 22.
In each fixed-length or variable-length data block, the data is stored in the column order in which the table was created. For example, suppose you create a table using the following command:
CREATE TABLE Test1
(
Col1 int NOT NULL
Col2 char (25) NOT NULL
Col3 varchar (60) NULL
Col4 money NOT NULL
Col5 varchar (20) NOT NULL
);
The fixed-length data section of this row contains data for Col1, followed by data for Col2, followed by data for Col4. The variable length data section contains Col3 data, followed by Col5 data. For rows that contain only fixed-length data, the following value is true.
The first hexadecimal number of the first byte of the data row is 1, indicating that there is no variable length column. (the first hexadecimal number includes bits 4 through 7; bits 6 and 7 are always 0, and if there is no variable length column, bit 5 is also 0. Bit 4 is always 1, so the value of four bits is displayed as 1.
The data row ends after the empty bitmap, and it follows fixed-length data (that is, the shaded part shown in figure 6-5 does not exist in rows with only fixed-length data).
The total length of each data row is the same.
A data row with any variable length column has an array of column offsets, and each non-NULL variable length column has a 2-byte entry indicating where the column ends in the row. (the terms offset and position are not completely interchangeable. The offset is based on 0, and the location is based on 1. A byte with an offset of 7 is in the eighth byte position in the row.) Storing variable-length columns with NULL values involves some special issues, as discussed later in the "null and variable-length columns" section.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un