8. The method of claim 7 , further comprising: identifying an association between the plurality of oilfield entities and the plurality of data entities based on the at least one of a plurality of hierarchical mapping units and a mapping constraint, wherein the mapping specification comprises the plurality of hierarchical mapping units, and wherein at least one of the plurality of hierarchical mapping units is associated with the mapping constraint.
7. A method for integrating oilfield data in a plurality of formats, the method comprising: storing the oilfield data associated with a plurality of oilfield entities in a data repository; obtaining, using a computer, a first structural description of a plurality of data entities of the data repository, wherein the first structural description describes database rows and columns of the data repository; obtaining a second structural description of a representation of the plurality of oilfield entities in an application programming interface (API), wherein at least a portion of the representation of the plurality of oilfield entities is obtained from a reference metamodel defining a plurality of domain objects within a hierarchy of an oilfield domain; obtaining, using the computer, a mapping specification associating the first structural description with the second structural description; forming, using the computer, the API based on the first structural description, the second structural description, and the mapping specification; generating a domain model source code based on the first structural description, the second structural description, and the mapping specification using a automatic code generator; compiling the domain model source code to implement the API; generating a plurality of domain object instances corresponding to the plurality of oilfield entities, wherein at least one of the plurality of domain object instances is instantiated from a domain object of the plurality of domain objects compiled from the domain model source code; identifying an association between the plurality of oilfield entities with the plurality of data entities based on the at least one of the plurality of domain object instances; receiving, by the API, a database operation for the reference metamodel, wherein the database operation comprises a plurality of elements that generate a result using data in the reference metamodel; determining that one element of the plurality of elements in the database operation for the reference metamodel is needed to generate the result in a form required by the database operation; executing the database operation after a status of the one element in the database operation is changed from optional to mandatory, and generating the result in the form required by the database operation.