GDBMS 1.0
Hash_table

A class which encapsulates a hash table. It organizes hash table in a relational data storage manner by using xml files for storage and indexing purposes. More...

A class which encapsulates a hash table. It organizes hash table in a relational data storage manner by using xml files for storage and indexing purposes.

Version:
V1.0
Author:
Georgi Pashev

Documentation of XML files, that hash_table uses to store and retrieve data. Data files: Data files have name data_[i].xml where [i] is calculated hash value for an id or a group of ids of records. an example data file has the following structure:

 <records trid="3">
 <rec id="3">
 <id>3</id>
 <name>Stefaniya</name>
 <fname>Popova</fname>
 <age>18</age>
 </rec>
 </records>
 


Index files are named index_[searchby_name]_[hashvalue].xml where [searchby_name] is the name of the field by which index is created and [hashvalue] is the calculated hash value for the redirections in the index. an example data file has the following structure:

 <records>
 <rec id="3">
 value
 </rec>
 </records>
 


where value is the value of the field, for which index is created. Main file, which contains data about the hash table itself. The name of the file is: hash_main.xml Its structure is as follows:

  <columns nr="3">
  
  
  
  </columns>
  <info>
  <nrrecords>22</nrrecords>
  <deletedids>2;12</deletedids>
  </info>
  
  
seaby=1 if index files must be created for that field. Do not alter manually. This is only done by the constructor of the class. deletedids consists of ; separated list of ids of deleted records, in order to perform id defragmentation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines