National Computer Rank Examination Level 3 Database Technology (5)

test analysis

◆Generally, it will appear in the multiple-choice questions and fill-in-the-blank questions in the exam.
◆Common test knowledge points include:
1. Master the four modeling conceptual frameworks in the UML modeling conceptual framework
2. Master the DBAS business process and demand expression (activity diagram and use case diagram)
3. Master the expression of the internal structure of the DBAS system (class Diagram, sequence diagram and communication diagram)
4. Understand the expression of DBAS system micro and macro design
5. Understand the expression of DBAS system implementation and deployment

5.1 DBAS modeling

1. Various modeling methods
In the early stage of building software with object-oriented technology, there are many types of object-oriented modeling languages, and different modeling languages ​​have their own advantages and disadvantages.
1. Booch method: one of the earliest object-oriented methods. The concept of object-oriented software engineering is proposed, which is more suitable for the design and construction of the system.
2. OMT method: adopts the concept of object-oriented, and introduces a variety of language-independent representations, which is suitable for analyzing and describing data-centric information systems.
3. OOSE method: The biggest feature is use-case-oriented. And the concept of external roles is introduced in the description of use cases, which is suitable for supporting business engineering and requirement analysis.
2. Unified Modeling Language (UML)
UML is a well-defined, easy-to-express, powerful, and general-purpose visual modeling language that provides modeling and visualization support for all stages of software development.
1. The definition of UML consists of two parts: semantics and representation:
(1) Semantics is described in natural language, which is defined in a four-layer modeling concept framework, and the contents of these four layers are as follows:
01. Meta-meta-model Layer: The most basic element "thing" that makes up UML. It represents all things to be defined.
02. Metamodel layer: It constitutes the basic elements of UML. Including object-oriented and component-oriented concepts. Each concept is an instance of the "transaction" concept in the meta-metamodel.
03. Model layer: each concept in this layer is an instance of the concept in the meta-model layer. Layer models are often called class models or type models.
04. User model layer: All elements in this layer are instances of UML models. Each concept in this layer is an instance of the model layer.
(2) Notation defines the visual standard notation of UML, which determines that UML is a visual modeling language.

2. The concept and type of view
When using UML, it is necessary to observe and analyze the system from different angles, so the concept of "view" was born. A view is a projection of some aspect of the model of the system. Focus on one aspect of the system. UML includes the following five views:
structure view, implementation view, behavior view, use case view, environment view

3. Views in UML
Each view of UML is composed of one or more diagrams. -A diagram is a side view of the system architecture, and all diagrams together form a complete view of the system. UML2.0 provides the following 13 diagrams.
UML2.0

5.2 DBAS business process and demand expression

1. Overview of business process and activity diagrams
In UML, the main graphics supported by business processes are activity diagrams. The main purpose of activity diagrams is to state the transfer of process control between activities.
Where to use Activity Diagrams
1. The business process described by the activity diagram has the following main contents:
Business process described by activity diagram
2. The business process described by the activity diagram has the following main contents:
(1) The transition between activities is indicated by the arrow, which indicates the direction of execution, which is marked as the next execution A condition for an activity. If there is no condition on the arrow line, it means that the activity pointed by the arrow will be executed automatically after the activity is executed.
(2) The bold straight line is a synchronous bar, which means that the subsequent activity execution route can be executed in parallel, or after all the parallel activities on it are executed, it will be executed sequentially here.
(3) The rhombus represents the branch and expresses the judgment. The following is an example of an activity diagram:
insert image description here

2. System Requirements and Use Cases Figure
1. System Requirements Concept
System requirements are what users want, and its essence is ultimately to find a way to capture the real expectations of users.
2. The concept and composition relationship of the use case model:
(1) The use case model is a tool to express all the functions that meet the needs of users, for the new system being constructed. The use case model describes what the system should do; for the constructed system, the use case model reflects what kind of functions the system can accomplish.
(2) The use case model is composed of use cases, its components: system, use case, role.

3. Contents of the three model elements
1. System

The system is an abstract representation of all basic functions that can be realized in the area within the boundary line (ie, the active area of ​​the use case).
In the use case diagram, the system is represented by a rectangular box, the name of the system is written on or inside the box, and the box can also contain use cases represented by symbols in the system.

(1) A role is an external entity interacting with the system, which can be a system user. Other systems, hardware devices.
(2) Generalization relationship: it refers to extracting the common behaviors of certain roles as general behaviors, and these general behaviors constitute superclasses.
(3) When defining a specific role, only define its different behaviors.
(4) A role can execute multiple use cases, and a use case can also be used by multiple roles. In use case diagrams, generalization relationships are used to describe the behaviors between roles.
(5) The generalization relationship between roles is represented by a straight line with a hollow triangle (as an arrow), and the direction of the arrow points to the superclass.

2. Use case
A use case represents a complete function and is a collection of all actions. Use cases are used to describe what functions the system should have from the perspective of system users, and help analysts understand the behavior of the system. In UML, represented by ovals, use cases are located inside the system boundary.
➢Relationship between use cases and roles
There is a connection relationship between use cases and roles, which belongs to association (or communication association). This association indicates which roles can communicate with this use case.
The association relationship is a two-way one-to-one relationship, which means that not only roles can communicate with use cases, but also use cases can communicate with roles. The representation method is a straight line with arrows connecting roles and use cases. The relationship types between use cases are shown in the figure below:
insert image description here

5.3 Expression of DBAS system content structure

1. Overview
System Internal Structure Diagram
2. System structure and class diagram
The class diagram mainly expresses the conceptual model of the problem domain. In addition to expressing the name of the abstract concept, it also needs to express "attributes" and "behaviors". The class circle is expressed as follows: class state
display A set of classes, interfaces, and collaborations and the relationships between them. A system can have multiple class diagrams, and a single class diagram expresses only one aspect of the system.
Class Diagram Representation Diagram
(1) Attributes
Attributes include attribute names, types, and default values. UML stipulates that its syntax is:
visibility name: type = default value (constraint)
(2) operation
An operation describes the behavior of a class. In UML, the syntax definition of an operation is:
visibility name (parameter list): return Type expression (constraint)
1. Attribute
Constraint: List all possible values ​​of the attribute, which is often used when defining the attribute of enumerated type. Separate each enumeration value with a comma.
Default: The initial value of the attribute
Type: Defines the type of attribute. It can be a basic data type. It can also be a user-defined type.
Name: is a string. Indicates the name of the attribute.
Visibility: Indicates whether the attribute is visible to elements outside the class. Different properties have different visibility. "+" means public (Public), "#" means protected (Protected), "-" means private (Private).
2. Operations
The visibility and constraints in operations are the same as those in attributes, and the types of operations are shown in the figure below.
Visibility: "+" indicates a public operation, "#" indicates a protected operation, and "-" indicates a private operation.
Parameter table: The syntax is the same as the parameter of the attribute, and the number of parameters is arbitrary.
name: is a string representing the name of the operation.
Return type expression: language-dependent description. This item is optional.
Constraint: used to describe the constraints on this operation.

3. Relationships
There are usually four relationships between classes: association, generalization (inheritance), dependence, and refinement. Their respective categories and contents are as follows.
(1) Association relationship
means that there is some semantic connection between two classes. For example: a person works for a company, and a company has many offices. It is considered that there is a certain semantic connection between people and companies, companies and offices.
Usually, the association is two-way. If the association between classes is one-way, it is called navigation association. In fact, the bidirectional general association
can be regarded as a special case of navigation association, and the arrows indicating the direction of the two associations are omitted.
A. Role association
insert image description here

B. Division and representation of aggregates
insert image description here

01. Inheritance relationship: Inheritance defines the classification relationship between general elements and special elements. In UML, inheritance is represented as a line with a hollow triangle at the end.
02. Dependency relationship: There are two elements A and B. If the definition of element A is modified, the definition of element B may be modified, which means that element B depends on
element A.
03. Refinement relationship: used to represent the same thing The relationship between two descriptions is often used to model different realizations of the same thing. Refinement relationships are represented as dashed lines with open triangles.

3. System Structure and Sequence Diagram
1. The purpose of the sequence diagram is to illustrate how the collaboration of objects achieves the goal of the system. The goal of the system has been divided into multiple sub-goals during use case analysis.
Sequence diagrams are mainly used to describe the sequence of sending and receiving messages between objects in the system. The sequence diagram has two axes as follows:
01. Longitudinal
represents the continuous process of time.
The vertical dotted line represents the execution of the object in the sequence, which is called the "lifeline" of the object.
02. Horizontal
represents the object.
Each object is represented by a rectangular box.
2. Communication between objects is represented by horizontal message lines between object lifelines, and the arrows on the message lines indicate the type of message, such as synchronous, asynchronous, or simple. The following figure is the sequence diagram drawn by the use case of customers purchasing goods:
Sequence Diagram of Customers Purchasing Products
3. Messages can also have additional conditions, stipulating that messages can only be sent and received when the conditions are true. When using conditions to describe branches, if the conditions are mutually exclusive, only one message can be sent at a time.
Message branch without mutual exclusion condition
4. There can be labels and annotations on the left and right of the object graph, and the labels can be of any type. For example, labels can be used to describe timing constraints, as shown in the figure: 5. Normally, edge annotations can be used for
Labels used to specify time constraints
looping description, as shown below
loop represented at the edge

6. Other functions of sequence diagrams
(1) Describe how objects are created and destroyed
In a sequence diagram, an object can create another object through a message. The lifeline of the destroyed object also stops at the destroyed location. Messages for creating and destroying objects are generally synchronous messages
(2) for recursive processes
When an operation calls itself, messages are always synchronous. thus. In the sequence diagram, it is represented by a synchronous message. And a simple message is used to represent the return.
(3) Dynamic model
The main purpose of the sequence diagram is to express how to communicate and cooperate between objects. All elements in the sequence diagram must exist in the class diagram.

Fourth, system structure and communication diagram
Communication diagram is a kind of interaction diagram, also known as collaboration diagram. A communication graph contains a set of objects, and shows the connections between these objects and the messages sent and received between them.
1. Communication diagram overview
(1) The communication diagram shows the organizational interaction relationship between various objects and the links between objects in the interaction process.
(2) The main elements in the communication diagram are basically the same as those in the sequence diagram, except that in the transmission of the message, it is necessary to specifically express which object the message is transmitted from to another object.
(3) Sequence diagrams and communication diagrams both describe interactions, but sequence diagrams emphasize time, while communication diagrams emphasize space.
2. The communication diagram shows the relationship between objects, and does not focus on the order of interaction. It does not regard time as a separate dimension, but uses sequence numbers to determine the order of messages and concurrent threads. The following figure is a communication diagram of a customer purchasing a product.
Communication diagram of customer purchasing goods

5.4 Expression of DBAS system micro design

1. Overview of
UML detail design: object diagram, state machine diagram, time diagram
2. Micro design and object diagram
1. Overview of object diagram
(1) Definition of object diagram
Object diagram in UML is used to describe all The structure of objects in the system. You can also think of an object diagram as a "snapshot" of the system at a certain point in time. An object diagram shows a set of objects and the relationships between them.
(2) Relationship with class diagram
Object diagram is an instance of class diagram, and the relationship between objects is an instance of the relationship between classes, and its graphic expression is similar to that of class. Object diagrams are often used to represent an instance of a complex class diagram.
An object graph is a snapshot of all objects that exist in the system at a specific point in time. It can be used to explain the class diagram and verify whether the designed class diagram is in line with the actual situation, and it can also help program designers understand the complex structure of the class diagram.
2. An example of an object diagram is shown in the figure:
Commodity Sales Module Object Diagram
3. Micro design and state machine diagram
1. When a certain object or a certain event has a very complicated state transition, a state machine diagram can be used to describe this process. The overview of the state machine diagram is as follows:
(1) In the state diagram, there can only be one initial state, which is the same as the starting point in the activity diagram. The illustration of the initial state is a solid circle. The end state represents the end of the entire state machine to this activity, and there can be multiple end states.
(2) Between the state and the state, the relationship between them is expressed by transition, which is illustrated by a straight line with an arrow.
(3) The main purpose of the state diagram is to state the state transition of related events or objects in the system.

2. In the state machine diagram, if a state transition occurs due to a certain time, the event needs to be marked on the transition relationship. As shown in the figure:
Commodity status map
4. In the state machine diagram, the transition between states is driven by events, and sometimes the transition of the state is determined by the time factor, and the time diagram can be used to describe the influence of time on state changes. as the picture shows.
Commodity price change time chart

5.5 Expression of macro design and deployment of DBAS system

1. Macro design and package Diagram
1. Overview of package
(1) Package is a combination mechanism that connects model elements together through internal semantics to form a whole called package, and package is also called subsystem.
(2) The model elements that make up the package are called the content of the package.
(3) Packages have their own model elements, and packages cannot share the same model elements, and packages can refer to model elements from other packages.
(4) The national display of the package is similar to a bookmark card, consisting of two rectangles, the small rectangle (label) is located at the upper left corner of the large rectangle. as the picture shows.
package icon

2. Overview of packages
A package diagram is a class diagram that shows the relationship between packages, and must ensure low coupling and high cohesion. Broadly speaking, a package can contain classes, interfaces, components, nodes, collaborations, use cases, etc., and can also embed other sub-packages. The relationships allowed between packages include
dependency, refinement, and generalization.
insert image description here

3. Like classes, packages also have visibility, and use visibility to control how external packages access the contents of the package.
01 : Shared visibility allows other elements to access and use the contents of the package.
02: Private visibility only allows you to own and reference your own package, access and use the content in the package.
03: Protected visibility In addition to the access requirements of private visibility, specific packages in packages with some inheritance relationship are allowed to access elements in general packages.
04: Implementing visibility is very similar to private visibility. Between packages that have dependencies, if the referenced package is defined to achieve visibility. Elements in the application package are not allowed to use classes in the referenced package.
The package diagram is a high-level view. Since all classes must belong to a certain package, when the relationship between packages is limited, all classes in the package will be affected by the settings in the package diagram. Therefore, the package diagram It can be used as a blueprint for the later implementation and deployment stages of the project.

2. Macro design and interaction overview Figure
1. The concept of interaction overview diagram:
The interaction overview diagram mainly uses the activity diagram as the basis, but the UML elements connected between the control flows are not activities, but interaction diagrams (including sequence diagrams, communication diagrams, etc.) Diagram, time diagram and interaction overview diagram. The main elements of the interaction overview diagram are exactly the same as those in the activity diagram, the only difference is an interaction box, which is used to replace the activity box in the activity diagram
. Show:
insert image description here

3. Macro design and composite structure diagram
1. In UML, the composite structure diagram is mainly used to express the system interface architecture, which is suitable for the situation where system integration is required. The composite structure diagram can be used to draw the relationship between the system to be developed and the external system relation. as the picture shows.
Composite structure diagram of shopping mall management system
2. Overview of the composite structure diagram
(1) The main element in the composite structure diagram is mail, and a component can represent a certain entity component or a subsystem.
(2) The connection relationship between components is mainly the assembly relationship, and this relationship needs to be communicated through the interface.
(3) When a component is connected to an external component, it must be connected through a port, which is shown as a square.
(4) The supply interface provides services to external components on behalf of a specific component. The requirement interface represents that a particular component requires services from external components.

5.6 Expression of DBAS system realization and deployment

1. System implementation and component diagram
Component diagram is used to represent the static implementation view of the system, showing the organization and dependence between a group of components, and used for system modeling of source code, executable release, physical database, etc. A component is the realization in a physical framework of the concepts and functions defined in the logical design. as the picture shows.
Component Diagram of Shopping Mall Management System

2. System Implementation and Deployment Diagram
Deployment diagram is also called configuration diagram, which describes the physical configuration of hardware and software in the system and the system architecture. Use nodes to represent the actual physical equipment, and according to the connection relationship between them, connect the corresponding nodes and explain the connection method. as the picture shows
Deployment diagram of shopping mall management system

Guess you like

Origin blog.csdn.net/weixin_47288291/article/details/123519434