Browse Prior Art Database

A Relational Database Table with Reuseable Row Indices

IP.com Disclosure Number: IPCOM000197764D
Publication Date: 2010-Jul-21
Document File: 5 page(s) / 31K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a table structure for a keyed relational database table, along with interface semantics and functionality. Rows are associated with a unique key. A unique key includes an integer row index and an integer row_index_incarnation. This provides simplified and efficient index-based row access.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 36% of the total text.

Page 1 of 5

A Relational Database Table with Reuseable Row Indices

A table structure is disclosed for a keyed relational database table, along with interface semantics and functionality. Rows are associated with a unique key. A unique key includes an integer row index and an integer row

_index

_

                                    incarnation. This provides simplified and efficient index-based row access.

In accordance with the table structure disclosed herein, an "Index" of a row in a table is a zero-based unsigned integer value indicating an offset of the row from the 0th row in a table. Thus, the row is not explicitly stored in the table, but derived from the position of a row relative to the beginning of the table. When this value is input to or output from table functions, it is referred to as "row

_index", and is an unsigned integer.

The table has an unsigned integer column named "Incarnation". When this value is referred to as existing in a table row, it is referred to as "Incarnation". When this value is input to or output from table functions, it is referred to as "row

_

                                         incarnation", and is an unsigned integer. Further, the table has an unsigned integer column named "NextIncarnation". When this value is referred to as existing in a table row, it is likewise referred to as "NextIncarnation".

Various basic operations on the table with the table structure as disclosed herein are executed as explained below.

For example, when a new table (table

_

name) is created, a table

_handle is returned.

The table

_handle uniquely identifies the table to other functions.

return

_value[output

]

create

_new

_table(table

_name[input

]

, table

_handle[output

]

);

Similarly, when an existing table is opened, a table

_

handle is returned. The

table

_handle uniquely identifies the table to other functions.

return

_value[output

]

open

_existing

_table(table

_name[input

]

, table

_handle[output

]

);

1

Page 2 of 5

In accordance with the table structure disclosed herein, a function may incarnate ("reuse") a row in table. The function takes a table

_handle and row

_data as input

                                  data into an incarnated row, and returns the Index and the Incarnation of the row via the row

_index and row

_incarnation

arguments. If successful, the function copies the row

_

output arguments, respectively, and a return

_value of SUCCESS.

return

_value[output

]

incarnate

_row

_in

_table(table

_handle[input

]

, row

_data[input

]

,

);

The function finds the first unincarnated row (i.e. the lowest-indexed row whose Incarnation is 0), assigns its NextIncarnation to its Incarnation, and increments NextIncarnation. If an unincarnated row does not exist, the first "potential" row is incarnated by setting its Incarnation to 1, and its NextIncarnation to 2. (If there are no potential rows, one or more are added, and the first thereof is incarnated.)

When NextIncarnation reaches the maximum value that can be stored in the unsigned integer that contains it, a subsequent reuse of the row results in NextIncarnation being set (or "...