隐式提交和显式提交(Implicit Database Commits and Explicit Database Commits)

1 Introduction

A database commit closes all opened database cursors. It is particularly important that database commits are not triggered (in one of the ways listed here) in SELECT loops and after the statement OPEN CURSOR.

2 Detail

Implicit Database Commits

The implicit database commits in an AS ABAP are caused by the fact that an AS ABAP uses its own work processes to connect to the database system. A work process can only ever execute a single database LUW but cannot interfere with the database LUWs belonging to other work processes. Since an ABAP program can be executed by different work processes during its runtime, the database LUW for the current work process must be completed each time an action takes place that leads to a change of work process. As a result, a database commit is performed implicitly in the following situation:

Completion of a dialog step

The program waits for a user action and does not occupy a work process during this time. The next free work process is assigned to the program in the next dialog step.
Calling a function module in a synchronous or asynchronous remote function call

The current work process passes control to a different work process or system. An exception to this are updates. When updates are running, sRFC and aRFC do not cause work processes to be switched or database commits to be executed.
Completion of a function module called in a separate work process using a synchronous remote function call.

Usually, a new work process is allocated to the call program. If a new sRFC follows quickly enough, and enough free work processes exist, the work process sRFC continues to be use

### 关系与关系的概念及区别 关系关系是计算机科学中两种描述数据之间关联的方。以下是它们的定义、区别以及应用场景。 #### 1. 概念 - **关系**:关系是指通过某种规则或计算间接推导出的数据之间的关系。这种关系通常不直接存储,而是通过算法或函数动态生成。例如,在重建中,使用连续数学函数(如SDF或NeRF)来表示空间点是否属于物体内部[^1]。 - **关系**:关系是指直接存储在数据结构中的关系,不需要额外的计算即可获取。例如,在图结构中,节点之间的连接通过邻接矩阵或邻接表明确表示。 #### 2. 区别 | 特性 | 关系 | 关系 | |------------------|----------------------------------------|----------------------------------------| | **存储方** | 不直接存储关系,通过规则或函数计算得出 | 直接存储关系 | | **计算复杂度** | 可能需要较高的计算成本 | 访问速度快,但可能占用更多存储空间 | | **灵活性** | 更灵活,适用于复杂或动态变化的关系 | 更稳定,适合固定或简单的关系 | | **应用场景** | 场景重建、机器学习模型等 | 图结构、链表、树等 | #### 3. 应用场景 - **关系**:适用于需要高效压缩存储或动态生成关系的场景。例如,构造函数允许编译器自动进行类型转换,尽管这可能导致意外行为[^3]。此外,重建技术广泛应用于三维建模计算机视觉领域。 - **关系**:适用于需要快速访问明确表示关系的场景。例如,在数据结构中,图的邻接矩阵或邻接表用于表示节点之间的连接关系。 ### 示例代码 以下是一个简单的示例,展示如何在C++中实现关系: ```cpp // 关系:通过邻接表表示图 #include <iostream> #include <vector> void explicitRelation() { std::vector<std::vector<int>> adjacencyList = {{1, 2}, {0, 2}, {0, 1}}; for (int i = 0; i < adjacencyList.size(); ++i) { std::cout << "Node " << i << " is connected to: "; for (auto& neighbor : adjacencyList[i]) { std::cout << neighbor << " "; } std::cout << std::endl; } } // 关系:通过函数计算两个数的关系 bool implicitRelation(int a, int b) { return a % b == 0; // 如果a能被b整除,则认为存在关系 } int main() { explicitRelation(); std::cout << "Implicit relation between 4 and 2: " << (implicitRelation(4, 2) ? "exists" : "does not exist") << std::endl; return 0; } ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值