Method and system for index serialization
AssigneeSap SE
InventorsMartin Strenge, Gerd G. Forstmann
Life of this patent
Estimating the term…
Abstract
A method and system for index serialization are described. A data structure containing objects using globally unique identifier (GUID) strings for their identification is indexed by creating a unique key object for each GUID. A master lookup table from GUID to key object is created along with a master table for each element type and a number of non-master tables for the other element type attributes. These element type tables are accessed using the key objects. The tables may then be serialized and deserialized.
Claims11
A method of serializing a plurality of elements stored in computer memory, the method comprising:
- creating a plurality of key objects, each of the plurality of key objects representing a unique identifier associated with a respective element of the plurality of elements;
- constructing a first data structure for indexing the plurality of key objects based on the respective unique identifiers;
- constructing a plurality of secondary data structures for indexing the plurality of elements, each secondary data structure based on a key object of the plurality of key objects;
- and
- writing the first data structure and the plurality of secondary data structures to a persistent form.
A method of loading serialized data including a serialized master table and a serialized plurality of secondary tables into computer memory, the method comprising:
- allocating memory for a new master table equal to a size of the serialized master table;
- reading an element record from the serialized data, the element record including an index;
- creating an element in memory for each element record in the serialized data;
- creating a reference to the element in the new master table at the index;
- allocating memory for a plurality of new secondary tables equal to sizes of the serialized plurality of secondary tables;
- reading a plurality of index pairs from the serialized data, each index pair including an index into a secondary table of the plurality of new secondary tables and a master table index;
- and
- setting a value of the index in the secondary table equal to a value contained in the master table at the master table index.
A computer-implemented system of serializing a plurality of elements stored in computer memory, the system comprising:
- a key module to create a plurality of key objects, each of the plurality of key objects representing a unique identifier associated with a respective element of the plurality of elements;
- a first data structure for indexing the plurality of key objects based on the respective unique identifiers;
- a plurality of secondary data structures for indexing the plurality of elements, each secondary data structure based on a key object of the plurality of key objects;
- and
- a serialization module to serialize the first data structure and the plurality of secondary data structures.
A system of loading serialized data including a serialized master table and a serialized plurality of secondary tables into computer memory, the system comprising:
- a serialization module to allocate memory for a new master table equal to a size of the serialized master table and to allocate memory for a plurality of new secondary tables equal to sizes of the serialized plurality of secondary tables;
- a read module to read an element record and an index pair from the serialized data and create an element in memory for each element record in the serialized data, the index pair including a master table index and an index into a secondary table of the plurality of new secondary tables;
- and
- an index module to create a reference to the element in the new master table at the master table index and to set the value of the index into the secondary table equal to the value contained in the master table at the master table index.
A method to serialize a plurality of elements stored in computer memory, the method comprising:
- using one or more processors to execute instructions retained in machine-readable media to perform at least some portion of:
- creating a plurality of key objects, each of the plurality of key objects representing a unique identifier associated with a respective element of the plurality of elements;
- constructing a first data structure for indexing the plurality of key objects based on the respective unique identifiers;
- constructing a plurality of secondary data structures for indexing the plurality of elements, each secondary data structure based on a key object of the plurality of key objects;
- and
- writing the first data structure and the plurality of secondary data structures to a persistent form.
Dependencies are inferred from the claim text.