Structure of a Row


Everything in the database has a structure; rows are no exception. Row data is stored within database blocks as records of varying lengths. The columns in a row are stored in the order in which they are defined in the table, and any NULL columns that are trailing columns are not stored.

Nontrailing NULL columns require a single byte of storage for each column length.


Each row in any table may therefore have a different number of columns depending on where NULL values occur. Each row in a table, however, has a row header and row data. The row header stores the number of columns in the row, any row chaining information that may be relevant, and the status of any row locks. In the row data portion of the row, for each column, the Oracle Server stores the column length and value (1 byte for the length for each column that does not exceed 250 bytes in length; larger columns require 3 bytes for the column length). The value is stored immediately following the column length.

Adjacent rows in the table do not require any spaces between them, but each row in the block has its own slot in the row directory in the block header that points to the beginning of the row.

Now that you understand the makeup of the row, let's create a table to contain them.



    Oracle 9i Fundamentals I Exam Cram 2
    Oracle 9i Fundamentals I Exam Cram 2
    ISBN: 0789732653
    EAN: 2147483647
    Year: 2004
    Pages: 244
    Authors: April Wells

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net