User Guide
SAP AG November 2002
Table Access (DELETE) Using B* Tree
DELETE FROM address WHERE city = 'Apach'
DELETE FROM address WHERE city = 'Apach'
SAP DB Data Page
Ardwick|.......
ensen|..... Arnhem |...
1
4
5
362
Apach |.
Ap-
7
Arbon |
.....
Anizy |.......
Athens |Greece
SAP DB Data Page
Ardwick|.......
rnhem |...
1
5
362
Apensen|.....
7
A
Arbon |.......
Anizy |.......
Athens |Greece
Close Gaps
The address table is defined via the city primary key [Page
101] column. In the address table,
delete an entry with the value Apach for the city primary key field.
If an entry is deleted from the table, gaps appear in the data section and in the position list of
the leaf page [Page 103] in the . The database system closes these gaps
and updates the position list to save storage space.
B* tree [Page 128]
Table Access (UPDATE) Using B* Tree
Table Access Using B* Tree [Page 107]
• If an UPDATE is performed and the
remains unchanged, only the
contents of the table row are changed.
is illustrated using the example of an UPDATE
statement.
primary key [Page
101]
If the data length changes, the positions of subsequent entries and their addresses in the
position list of the
103 in the B* tree [Page 128] are changed.
•
leaf page [Page
]
• If the key field changes, the UPDATE is executed as a DELETE (
) with a subsequent INSERT (
).
Table Access (DELETE)
Using B* Tree [Page 110] Table Access (INSERT) Using B*
Tree [Page 10 ]
The B* tree [Page 128] structure changes in all cases of INSERT, UPDATE, and DELETE
when there is either not enough space in the target page or the fill level falls below the
predefined fill level.
9
Changes in the B* Tree Structure
User Manual: SAP DB 111










