Data object

honggarae 13/11/2021 986

Introduction to Data Objects

Any data structure elements referenced in the application, such as files, data, variables, etc., are called data objects, or objects for short. It is named using characters allowed by the programming language. In Fortran 90 or 95, a data object is a data entity, which is a constant, a variable or a sub-object of a constant. The data objects processed by the FORTRAN language have types (explicitly or implicitly specified), data values ​​and attributes (the characteristics of the object and the way it is used). Sub-objects are part of some well-known objects and can be referenced and independently defined by other parts. The sub-object includes the part of the array (array element), the part of the string (substring), and the part (component) of the structure.

Data attributes

Data attributes define the nature of the data object, which can be used to: ①Name the instance of the data object: ②Describe the instance: ③Create a reference to another table Reference to another instance. In addition, one or more attributes must be defined as identifiers. In other words, when an instance of a data object is to be found, the identifier attribute becomes a "key". In some cases, the value of the identifier is unique, but not required. In the example of the data object "car", the identification number is a reasonable identifier.

Through the understanding of the problem environment, a set of attributes of a specific data object can be appropriately determined. The attribute of "car" can be used in the application system of the automobile transportation department, and the automobile manufacturing company needs the control software in the manufacturing. In the latter case, the attributes of the "car" may also include identification number, body type and color, but in order to make the car a useful object in the manufacturing control environment, many other attributes (such as internal code, Drive system type, car interior packaging designer and transmission type, etc.).

Data object connection

The way data objects are connected to each other is called connection, which is also called relationship. Binary connection is a connection in which only two entities participate. It can be divided into three types:

(1) One-to-one connection

For example, a department has a manager. And each manager only works in one department, the relationship between the two entities of the department and the manager is one-to-one; one person can only have one valid ID, and one ID can only correspond to one in the legal sense. The connection between the two entities of person, individual and ID card is one-to-one; a class has a monitor. A squad leader can only serve in one class, and the connection between the two entities of the class and the squad leader is one-to-one.

From the above example, we can draw a conclusion: If for each entity in the entity set A. At most one entity in entity set B is associated with it, and vice versa. Then entity set A and entity set B have a one-to-one relationship.

(2) One-to-many contact

For example, a class has multiple class leaders, and a class leader can only serve in one class. The two entities of the class and the class leader The connection is one-to-many; there are multiple students in a class, and one student can only be in one class. The connection between the two entities of the class and the student is one-to-many; one product category contains multiple products. A commodity belongs to only one commodity category, and the relationship between the commodity category and the two entities is one-to-many.

(3) Many-to-many connection

For example, a publisher can publish multiple books. Each type of book can be published by multiple publishers, and the relationship between the publisher and the book entity is many-to-many; a student can take multiple courses, and a course can have multiple students electives. The connection between the two entities is many-to-many.

Auxiliary data objects

Auxiliary data objects are also system service objects. The main task is to reflect and record the basic data used in the system and commonly used constant data, which can be added according to actual needs. Necessary data objects, several commonly used auxiliary data objects are listed below.

(1) Facilities and equipment. The equipment object refers to the facility and equipment entity related to the supervision business and available, and its attributes include: equipment number, equipment name, function description, specification model, inventory quantity, purchase date, equipment unit price, unit of measurement, remarks, etc.

(2) Contact units. The unit object of the dealing unit refers to the entity related to the construction project and the supervision business. Its attributes include: unit number, unit name, unit address, unit type, contact person, person in charge, contact number, remarks, etc.

(3) Types of units that you are dealing with. The type of unit is an extended object that dynamically reflects the characteristics and nature of the unit. It serves the object of the unit. Its attributes include: unit type number, unit type name, remarks, etc.

In addition, there are many auxiliary data objects, such as personnel, engineering level, etc., according to the needs of the system, such as the nature of the engineering that has been introduced before, system users, and auxiliary data objects that can be added at any time.

Latest: Key conflict

Next: PSP game console