OceanBase Database stores data in macroblocks. Each table can contain multiple macroblocks, and each macroblock occupies 2 MB of space. A macroblock contains one or more microblocks, and each microblock contains one or more rows of data.
Organization form of tables
Each table in OceanBase Database has a storage key. Storage keys of a table without a primary key are the partition key and an automatically generated invisible auto-increment column. The storage key of a table with a primary key is the user-specified primary key. OceanBase Database uses the clustered index table model to organize tables. Data is stored in tables based on the order of their storage keys. Data rows are inserted into tables based on the order of their storage keys.
All rows follow the same column sequence. OceanBase Database stores data in a table based on the column sequence that is specified when the table is created. A newly added column is placed at the end of the table.
Row storage
Rows are stored in microblocks. Generally, all column data of a row is stored together. If a table contains large object (LOB) data, the size of the LOB data may exceed that of a macroblock. In this case, the excess part of the LOB data is stored in other macroblocks.
ROWIDs
OceanBase Database stores only clustered index tables. A ROWID actually contains the storage key column of a table.
Null value storage
OceanBase Database stores null values and uses one byte to specify whether a column is null.