Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: The structure of the row

RE: The structure of the row

From: Steve Adams <steve.adams_at_ixora.com.au>
Date: Sat, 5 Aug 2000 09:47:27 +1000
Message-Id: <10579.113902@fatcity.com>


Hi All,

If the length byte for a NULL contained 00, then there would be no distinction between a NULL and a zero-length string.

Regards,
Steve Adams

http://www.ixora.com.au/
http://www.oreilly.com/catalog/orinternals/
http://www.christianity.net.au/


-----Original Message-----
From: Gautam_Reddy_at_Dell.com [mailto:Gautam_Reddy_at_Dell.com] Sent: Saturday, 5 August 2000 2:53
To: Multiple recipients of list ORACLE-L

Subject: The structure of the row .................for those who don't
know

Got this from my colleague
"The row structure is as follows:
Status Byte | Lock Byte | # Cols | Length Byte of first Column | Data of first Column | etc...
The key piece relevant to this topic is the # Cols. This piece of the header of each row defines how many columns for this table are represented in this row. For example the table has 10 columns defined, but for this given row only 6 are represented. So the system would store a length byte and Data pair for only the first 6 columns. The remaining four would not be stored at all and thus take up no storage at all.
If a null column is between two non null columns the system just stores a length byte, the values is strangely "FF" not zero as you might expect. So a row might look like:
C2 00 06 04 ABCD 03 ABC FF 02 AB 06 ABCDEF 01 A C2 Status byte (C2 if I recall correctly is a "normal" row) 00 Lock Byte Points to the trans slot that is locking the row (00 - no lock)
06 Six columns in this row
04 Length byte, ABCD Data
03 Length byte, ABC Data
FF Length byte of a NULL, no Data

02 Length byte, AB Data
06 Length byte, ABCDEF Data
01 Length byte, A Data

If there are more columns in the table definition, all of them would be null. This basic structure is the same in 7 and 8. " Received on Fri Aug 04 2000 - 18:47:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US