1. A method for storing communication messages in a relational database, comprising: accepting an object model comprising data elements having respective data type definitions and further comprising associations between the data elements, wherein the data elements, the data type definitions and the associations are derived from a hierarchically-structured HL7 specification and comprise at least one data element whose data type definition corresponds to multiple possible data types; defining a relational database that represents the object model based on the data elements and the associations; receiving a communication message that conforms to the HL7 specification and comprises data items corresponding to one or more of the data elements, including at least one data item having the data type definition that corresponds to the multiple possible data types; processing the received communication message so as to identify an actual data type, selected from among the possible data types, to which the at least one data item belongs; and storing the data items, including the at least one data item, in the relational database so as to preserve the data type definitions of the data items, including the identified actual data type, and the associations between the data items, as defined in the object model, wherein the data elements comprise classes, each having one or more class attributes, wherein defining the relational database comprises creating for each class a respective class table comprising at least one unique identifier in the relational database, and mapping at least one of the class attributes to columns of the class table, and wherein the object model comprises at least one of an association of cardinality 1:n representing a relationship between a parent class and a child class, an association of cardinality n:m representing a relationship between one or more parent classes and one or more child classes, a recursive association representing a relationship between a parent class and a child class wherein the parent class is equal to the child class, and a group association representing a relationship between a group comprising two or more classes and a child class.
10. The method according to claim 1 , wherein the object model comprises the association of cardinality n:m, wherein the association has one or more n:m association attributes, and wherein defining the relational database comprises creating a respective association table in the relational database, the respective association table comprising keys to the class tables corresponding to the parent classes and the child classes and at least one of the one or more n:m association attributes.