Research on Application Model of Marine Geological Sampling Model Based on Object-Oriented Relational Mapping

In the study of marine geology, the sampling technology and preservation are very important links. Marine geology is developed on the basis of marine sediment sampling technology. ORM (Object-Relation Mapping) technology is an effective method to solve the “impedance mismatch” between object model and relation model. The research on object-relation mapping technology has become a research hotspot in the field of software architecture. The development of object-relational database has enhanced the ability of database to support complex data types, making the integrated storage of spatial data, topological relations and attribute data a reality. This paper proposes a class hierarchy based on the technical framework of object-relational mapping, and explains all kinds of classes. The application of this framework can simplify the mapping mechanism on the premise of meeting the requirements of marine geological sampling, thus providing users with an object-oriented way to intuitively access the database.


Introduction
With the rapid development of information technology in the past ten years, information technology with database technology, GIS technology and network technology as its core has become an important development direction of information technology in the field of geosciences. The ocean is a huge treasure house of mineral resources. In recent years, people have been engaged in various marine geological surveys at sea, such as earthquake, gravity, magnetic force, water depth and geological sampling. All these marine geological surveys need to collect a large amount of navigation and positioning data. The development of object-relational database has enhanced the database's ability to support complex data types, making the integrated storage of spatial data, topological relations and attribute data a reality [1]. Analytical solutions of mathematical models play a unique role in understanding the characteristics of systems [2], but in most cases people use numerical methods to solve them. With the continuous addition of marine geological sampling survey methods, the traditional marine geological sampling database data model has poor data correlation and limited data types [3], which make it difficult to express complex data types [4]. Marine geological survey data are more complex spatial data at small scale, involving spatial two-dimensional and three-dimensional data. However, the traditional attribute data management mode has obvious deficiencies in processing 2-D and 3-D marine geological data.
In marine geological survey and resource exploration, seabed sampling technology and its equipment occupy a pivotal position, and its operation area can be expanded from the seashore with water depth of several meters to the deep sea with water depth of several kilometers. The mechanism 2nd International Conference on Oil & Gas Engineering and Geological Sciences IOP Conf. Series: Earth and Environmental Science 558 (2020) 032021 IOP Publishing doi:10.1088/1755-1315/558/3/032021 2 of object-oriented design and the design idea of relational model directly form the impedance between object-oriented data model and relational data model. In this paper, the Object-Relation Mapping (ORM) technology is used to establish an application model of marine geological sampling based on ORM technology, which makes up for the deficiency of the existing marine geological sampling database.

ORM Overview
In view of the impedance mismatch between the object model and the relational data model, some solutions have been proposed to map the object model to the relational database model. The data model is the foundation of the database structure, which is a collection of conceptual tools to describe data, data relations, data semantics and consistency constraints. Generally speaking, a data model is a set of strictly defined concepts. These concepts accurately describe the static characteristics, dynamic characteristics and integrity constraints of the system. Mathematicians define "metrics" in a formal way: they compare metrics to a function applied to a set of real numbers, which is used to measure the distance of objects in the set [5]. This mismatch becomes the main contradiction when looking for a suitable method for accessing data. Using object models, access is often made through the relationships between objects; The introduction of statement query into relational database reduces the tedious programming work of application programmers navigating and retrieving records from the database, but it is necessary to study and implement query optimization strategies in order to improve the efficiency of the system. Features mainly describe some relationship features of objects or subclasses of interest. For example, the characteristics of marine geological survey samples include physical and chemical characteristics, including temperature, color, weight, porosity, permeability and other characteristics. The solution to object-relational mapping is to map each object to a single row of a database table, which usually comes from a table or can be generated by a table join operation.

Object relation mapping rule
For a large amount of data already existing in the relational database, it can be modeled as objects through object relational mapping. The mapping at this time is actually the transformation from the relational model to the object model. When an association is defined in a mapping file, it will be interpreted as a reference type instead of directly corresponding to a specific type. The relation pattern is generally composed of attribute sequences and fields corresponding to each attribute. The relation pattern is relatively fixed, but the value of the relation is variable [6].
In general, persistent classes are mapped to a table in the database, and classes in the object metadata model correspond to tables in the relational metadata. Each instance of the class corresponds to a record in the table, and the attribute of the object corresponds to one or more fields in the table. The mapping relationship between entities and their attributes and relationships is shown in Table 1. Object-oriented concept Relation-oriented concept Class Table  Object Rows of table  Attribute Columns of Table   Object modeling of entities is used to solve the mapping problem between relationships and classes in relational data models, while object modeling of entity relationships models inheritance and aggregation relationships between objects. A group of messages, each message has zero, one or more parameters, and the object should respond accordingly after receiving the message. The key of the relation on the relation name can uniquely determine a tuple in the relation database, so it can be mapped as an object identifier. According to the association between the tables, find the referenced 3 object table, and use the association query of the database to find the objects associated with this object and set their association relationship. The attributes in a relationship are unordered. Formally, the relationship is equivalent to a two-dimensional table, and there is no combined data in the table. The columns of the table correspond to attributes, while the rows of the table correspond to tuples.

Implementation strategy of object relation mapping
When mapping an attribute to a column, it is usually the case that a class attribute is mapped to a column of a table. When the attributes of the class and the columns of the table are of the same simple type, one-to-one mapping can be performed directly. And none of its proper subset has this property, the attribute group is called the key of the relation [7]. Many object-oriented semantics are closely related to the mapping implementation of objects and classes, including the mapping of class definitions, the mapping of objects, and the implementation of object identifiers, the mapping of relationships between objects, and integrity and constraint checking. However, when there are complex relationships between attributes, or when an attribute must be measured by combining its multiple aspects, we need a model to give how to combine multiple related measures. Classes are connected with each other through inheritance, and a class hierarchy can be formed through the relationship between superclass and subclass. superclass is an abstraction of subclass, and subclass is specialization of superclass. In this way, the relational instance of the relational schema All-Class-Properties-Schema can store the attribute definitions of all classes in the database. However, when the class attributes type to be mapped is not a simple type or a type not supported by the relational database, the problem is more complicated. For example, most relational databases do not support Boolean, which is common in class attributes, so it is necessary to map it to a character or numeric column [8].

The construction of the model
Based on the existing marine geological survey data, a unified logical model of marine geological survey data is designed by using object-oriented method. In this respect, the tidal current dynamics model is based on the principles of conservation of momentum and conservation of matter. Many years of research have shown that although there is some uncertainty in the turbulence treatment, it is not enough to overturn the correctness of the model. A business model, a logical model and a physical model with marine geological characteristics and industry characteristics are established, and mapping and conversion among the models are realized through a data model metadata standard and a data model standard management system [9]. For taking columnar sediment samples, the gravity sampler is simple in structure and convenient to use, but the sampling rate is low and the sampling length is small, so it is not suitable for use in sea areas with coarse sediment grain size. When mapping a class to a relationship, the attribute type of the class needs to be considered. Object-oriented systems generally support more abundant type systems than relational models. At this time, an attribute of a class cannot be mapped to an attribute of a relation. Generally, it only provides some simple data types, such as integer, real type, etc., and does not provide the definition and generation capability of new types. The real world is so complicated that it is absolutely impossible to describe it clearly with such a simple and static structure. The complexity of the method can be measured by specific complexity. If the complexity of all methods is 1, WMC = n, that is, the sum of the number of methods in the class. WMC reveals the time  4 and effort to develop and maintain classes. The larger WMC of a class, the greater the possible impact on subclasses, and the worse its versatility and reusability.
Let the scale of the activity graph be , the number of nodes in the first layer be N , where the weight of the i node is ; The number of judgment nodes in the first layer is B , wherein the bifurcation number of the first judgment node is Oi and the weight value is Ci ; The number of cyclic structures is Z , and the weight of the i -th cyclic structure is Mi ; The number of concurrent structures in the first layer is g, where the weight of the i -th concurrent structure is , then there are: Assuming that the number of use cases in the system is N and the scale of each use case is Si, there are: The implementation of software process metrics mainly includes the following processes: defining metrics, data collection, analysis and evaluation, and process optimization. Based on the above points, we obtain the implementation process of software process metrics, as shown in Figure 1: There are various types of marine sediments, complicated causes and different properties, and the characteristics, changing trends and application values of seabed geological environment are also different. With the progress of observation technology, the observation of water depth and water level is becoming more and more perfect in precision and spatial-temporal resolution. Therefore, the application of the model can be completely satisfied. In the past, the business process analysis in the process of formulating the marine geological survey data standard did not design the model management environment and the business model standard. Most of them described the business requirements in the form of flow charts and Word documents. However, when measuring the density of an object, the volume attribute and mass attribute of the object must be considered. In the object-torelational mapping mode, class table inheritance naturally forms a one-to-one mapping between classes and tables [10]; Persistence of superclass is omitted in concrete table inheritance. The values of some or all variables of an object or the definition of a method change over time, but its identity remains unchanged. The concept of identity does not apply to records in relational databases. Records in relation records in relation systems are distinguished according to the values they contain. Therefore, an attribute of a class may be mapped to a relational attribute, may also be mapped to multiple relational attributes, and may even be mapped to another relational aggregation type such as an array in some cases. However, logically, it can be considered that the attributes of objects are mapped to columns, objects are mapped to rows, and all objects of the class are mapped to tables.

Mapping of object models
The main purpose of seabed geological sampling is to obtain seabed geological samples, understand the environmental information of bottom materials, and verify the inference and interpretation of underground information. The greatest advantage of object-relational mapping is that it not only supports object-oriented model, but also does not affect the use of underlying relational databases. It should be noted that not all class attributes need to be persisted, that is, not all attributes need to be mapped into columns. The relational model does not overcome the weakness of implementationoriented, which takes records as the most basic independent data expression unit and cannot be well applied. This consistency is especially important for metrics. Many metrics have some subjective components more or less, and the amount of subjective components depends on the specific measurement environment. There may be some attributes that describe the intermediate results of business processing, so persistent storage is not required, while well-designed relational domains are often required attributes of objects. Most of the existing specifications are formulated for the needs of multidisciplinary and comprehensive marine geological survey, which cannot meet the needs of a single technical method for seabed geological sampling. The name given by the user can be used as identification. A typical use of this form of identification is for files in a file system. Each file is given a name that uniquely identifies the file regardless of its content. The efficiency of this indirect mapping is lower than that of a real object-oriented database. In fact, all persistent data accesses need to first explain the object-oriented semantics, and then complete the operations of corresponding relationships and tuples in the relational database.
From the built business model, select business unit activities. The business unit of business analysis serves as the basic unit of business definition and division. Business elements of a business unit are extracted from a business model, elements that do not meet the current business are revised, and each business element and its related data items are standardized and defined. Fig. 2 is a flow chart of model design. Inheritance is one of the main differences between relational data and object-oriented data structures. The relation between entities is an important description of data model and an important basis for judging whether the data model is suitable for a certain field. The relation between entities expressed by the relation model is not explicit, but implicit in the common attribute of the relation. Its essence is to assign numbers or symbols to specific attributes of entities such as systems, components, processes or quality according to certain rules, i.e. quantitative representation of entity attributes, so as to clearly understand the entity. Instead of simple data types like integer and long integer, this principle can avoid the dependence of data operations on data semantics. As shown in fig. 3 is a timing diagram for searching objects. As can be seen from the figure, after the data analysis processor initiates the operation of reading objects, Domain Object Assembler reads out the record set that meets the conditions from the database, then calls sqlGenerator's new Mapping method to obtain the matching set of object attribute names and library table field names, and finally converts the record set into intermediate data through C Markup. ORM is a mapping between the relational database and the business entity object, mapping the data of the tables in the relational database into objects and presenting them in the form of objects. Relevant technical standards for marine resources survey, absorb their ideas and compilation methods, analyze their availability, and understand the requirements for marine geological sampling in marine geological survey of shallow sea areas. In addition, the spatio-temporal scale also has a great influence. For example, in a subsidence basin, if only the sediment filling pattern on a long time scale is considered, the material transport process on a short time scale can be ignored. It is not usually a oneto-one mapping of classes to tables. There are three basic strategies for mapping inheritance to relational databases. These three strategies adopt different methods to map classes to tables to realize class hierarchy with inheritance relationship.
The data entry module can be divided into two parts: manual entry function and automatic import function. Manual recording includes recording of map data, map data and text data. Automatic guide function: supports the guide of database files and can generate metadata tables. Data modification: supports modification of spatial data or attribute data. The manual entry process is shown in fig. 4.  Managing a large amount of data is the aim of the database system. The transaction processing fields used in traditional relational databases generally have the following characteristics: uniform structure, record-oriented, small data items, and all record fields are atomic. Persistent data classes are generally interface parameters in multi-layer application systems and are responsible for transferring messages between layers. Simple data types can undoubtedly reduce the overhead of inter-layer communication and improve the efficiency of inter-layer reference. The name given by the user can be used as identification. A typical use of this form of identification is for files in a file system. Each file is given a name that uniquely identifies the file regardless of its content. From the point of view of observation, the data at points can be integrated into the distribution on the surface, while the drilling data at different locations can be integrated into the three-dimensional spatial distribution. If supplemented by dating data, the time evolution information can be further obtained. The technical standards shall conform to the provisions of relevant technical specifications and shall not conflict in principle with the geological survey standards of relevant industries. Object-relational mapping technology can shield the database structure from object-oriented developers. Developers only need to care about objects, and all database operations related to objects are completed by the object-relational mapping framework. As long as all the required data about a single class are stored in only one table. But there are also several shortcomings. First, when modifying a class, the table corresponding to the class and the table corresponding to its subclasses must be modified. Second, it is difficult to maintain data integrity.

Summary
The main purpose of seabed geological sampling is to obtain seabed geological samples and understand the environmental information of marine sediments. The seabed geological sampling standards will stipulate the technical methods, technical requirements and working procedures for seabed geological sampling. Since the Epicentre data model is only a logical model and cannot store data, the existing model projection tools can be used to develop marine geological survey model customization software and model projection conversion software. Can make up for the defects of the traditional relational database system, has the advantages of flexible operation and strong expandability, and users can not care about the physical storage of data. Then the basic principle of object/relation mapping is analyzed by comparing the object model with the relational data model. The difference in theoretical basis between object model and relational data model results in "impedance mismatch". Because the impedance of the object-oriented model and the relational data model do not match, when the objects in the system are stored in the relational database, it is necessary to map the objects to the relationships. Object relational mapping is the process of data conversion between relational model and object model.