Salesforce
when you define a new application object or write some procedural code, Force.com does not create an actual table in a database or compile any code. Instead, Force.com simply stores metadata that the system’s engine can use to generate the virtual application components at runtime.
当我们在force.com里创建新的应用对象或是编写一些存储过程代码时,force.com并不会生成物理的数据库表或者进行存储过程代码编译,而是采取轻量级的操作,将对应的元数据写入存储中,这些元数据能通过系统引擎在运行时生成必要的物理模型。
When you need to modify or customize something about the application schema, like modify an existing field in an object, all that’s required is a simple non-blocking update to the corresponding metadata.
当我们在开发过程中需要修改应用schema对象时,在Editor里所有的修改均为简单的元数据修改,非常轻量。
ABAP
ABAP里的一张已经存在的数据库表,如果编辑后没有激活,则改动对整个ABAP workbench不可见。一张新创建的表,如果没有生成runtime object-运行时对象,则根本无法使用。

下图是一张新建的ABAP数据库表:

没有生成runtime object, 则其他程序和ABAP DDIC对象均无法使用。

SAP HANA
和salesforce及SAP ABAP DDIC类似,看个例子。
使用SQL SELECT TOP 1000 * FROM "SAPAG3"."COMM_PRODUCT"查询这个表的内容。

那我如果想根据这个表的名称COMM_PRODUCT, 用SQL查询出它所有的metadata,应该怎么操作呢?
SELECT *
FROM "SYS"."TABLE_COLUMNS"
WHERE SCHEMA_NAME = 'SAPAG3' AND TABLE_NAME = 'COMM_PRODUCT'
ORDER BY POSITION
查询出的元数据如下图所示:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

网友评论