a structured data storage apparatus inputs a given number of structured
data items each including respective hierarchical structures of element
data items, stores structured data items in first memory, extracts common
hierarchical structure of first group of element data items, which is
included in and common to structured data items, from the structured data
items, based on frequencies of occurrence of first group in structured
data items, inputs structured data item to be stored, which includes
common hierarchical structure of first group, assigns element IDs
corresponding to respective element data items of first group to storage
areas allocated to respective element data items of first group in memory
location of first memory, the memory location being allocated to
structured data item to be stored, stores first group included in
structured data item to be stored in respective storage areas in memory
location.