什么是簇表?

2002-9-19 19:25 yaopipi
什么是簇表?和透明表的区别?

2002-9-20 23:25 xjq

簇表大概意思就是把好多表融合在一张表里,我从help中找到一些描述,你可以看看。
Table Clusters
Several logical data records from different cluster tables can be stored together in one physical record in a table cluster.
A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster tables for this key. If the data does not fit into the long field, continuation records are created. Control information on the structure of the data string is still written at the beginning of the Vardata field. A table cluster has the following structure:
Field        Data type          Meaning
CLKEY1        *             First key field
CLKEY2        *             Second key field
...
...
...
CLKEYn        *             nth key field
Pageno       INT2(5)        Number of the continuation record
Timestamp    CHAR(14)       Time stamps
Pagelg       INT2(5)        Length of the string in Vardata
Vardata      RAW (n)        Contains the entries from the data fields of the assigned cluster tables as a string, max. length n depends on the database system used
The records of all cluster tables with the same key are stored under one key in the assigned table cluster. The values of the key fields are stored in the corresponding key fields of the table cluster. The values of all data fields of the assigned cluster tables are written as a string to the Vardata field of the table cluster. Besides the actual data values, the data string contains information on the structure of the data and which table it comes from. If the string exceeds the maximum length of the Vardata field, a continuation record is written with the same key values. The continuation records for a key are distinguished by their value in field Pageno. The actual length of the string in the Vardata field is stored in the Pagelg field by the database interface.
You need the structural information stored in the ABAP Dictionary to read the data from a pooled table or cluster table correctly. These tables can therefore only be processed using Open SQL with the cluster interface, and not with Native SQL directly in the database.

2002-9-20 23:44 xjq

只能意会,不能言传。:)
说实话,我真的说不清楚,我大概的理解就是他把不同的cluster table都存在一个table cluster里,而这个table cluster的结构就是由上面几个字段组成,key字段都存在对应的key字段里,所有其他的内容都存在vardata这个字段,在这个字段里不光存入数据还存入这些数据都来自那些表,如果超过这个字段,就会另写一记录连续下去,吧pageno这个字段来标志这是连续上一条记录的。反正就是这样了,具体为什么要用cluster table我也不清楚。

2002-10-8 18:16 nico

    YAOPIPI:
        其实老徐已经给你说的比较清楚了。我觉得你可能需要了解一个数据库
    存储上的问题。我不知道你是不是熟悉ORACLE数据库,不过我只能假定你了
    解了:)
        在物理上,数据库里的数据都是以数据文件的形式存储在磁盘上的,所
    以数据文件的格式必须尽量符合OS所对应的磁盘的格式。由于数据库往往需
    要在许多不同的OS上使用,所以她的物理格式也就比较的多。那么在逻辑上
    的数据怎么样满足多样化的存储格式的要求呢?这个问题的一个简单的解决
    办法就是利用“簇”来解决。在透明表里一个RECORD的多个字段是放在不同
    物理字段中,这样作很麻烦同时也不经济。我们可以定义一个VARDATA的超级
    字段把这个RECORD的所有字段都存储在这个字段里。通过定义指针来读取所
    需要的数据。这就是簇表。
        举个例子吧,FI模块里的BSEG就采用了这个方式。R/3里用到的DATASET
    也采用了这个技术。如果用C语言来读数据库,往往要定义指针也是这个道理。
        好了,先说这么多了。有问题请继续商榷。 
2002-12-7 17:40 snowwolf

SAP里有些较大的表会同时用到相同的主键字段,将这些相同的字段取出来放在一个表里,这个新表叫簇表,这样子会产生很多簇表,作用吗,无非就是管理方便节省资源。
2002-12-9 02:48 sonicme

hi all experts,
各位斑竹及高手们,最近对cluster table研究了一下。不敢独享,特地和大家分享一下。
其实,在SAP中的表的种类有以下三种:
Tranparent table
Pools
Cluster table
其中,transparent table同各种数据库中的table概念一致;不再过多地叙述了。
SAP所特有的表结构,就是Pools和Cluster table;他们已经不是各种数据库常规的表了,也不能够被数据库直接访问。只能通过SAP自己的工具来直接访问。
Cluster table的优点是压缩数据量。
置于定义么,总斑竹xjq的回复及斑竹nico的回复已经很清楚了。
欢迎各位能够提出宝贵的经验之谈,谢谢!
Soncime  :)
sonicme@msn.com
12.08.2002

2002-12-9 19:25 sczy

哈哈哈,就在这里ABAP资料库里的资料抄出来的!!!
SAP 系统包含下列表类型:
透明表
每个透明表在数据库中有一个相应的物理表。物理表的名称和数据字典中的逻辑表
定义的名称一致。所有事务和应用数据存贮在透明表中。
结构
结构在数据库不存在数据记录。结构用于在程序之间或程序与屏幕之间的接口定义。
附加结构
附加结构定义字段的子集,该字段属于其他表格或结构,但是在修正管理中作为单
独的对象。
存贮表
存储表可以用来存贮控制数据(例如:屏幕顺序,程序参数或临时数据)。几个存
储表可以组合成一个表库。该表库和数据库中的一物理表库相一致。它包含了各组
合库分派给它的所有记录。
簇表
连续的文本如文档之类可以存贮在簇表中。几个簇表可以组合成一个表簇。对这种
表类型,不同表中的几个逻辑行组合到一物理记录。这可以实现一对象接一对象地
存贮或访问,访问簇中的表的一个前提是,至少关键字的一部分必须相符合。几个
簇表存贮在数据库中 一个相应的表里。
创建视图结构
活动期间生成视图的结构。该结构在运行时间环境作为接口使用。 通常不显示在AB
AP/4 词典中。

2002-12-10 21:55 MampM

据我所知,至少有两个作用:
1。存储二进制数据
2。数据安全,只有通过程序才能读取到相应的内容,便于权限控制
2002-12-13 21:15 yaopipi

对,关键是要找到主键
2003-1-7 19:23 knightsun

在R/3中有三种表类型:
透明表格
共享表格
簇表
透明表格:
    透明表格与数据库中的表一一对应,有相同的表名,字段数,字段名ABAP 词典中透明表的定义相对数据库是独立的,定义的表与数据库中的表有相同的结构。当表被激活时,数据库中的物理表存储在ABAP 词典中。
共享表格:
   共享表格与数据库中的表是多对一的关系,表名不同,字段数不同,字段名不同。共享表是SAP的一个特有构思。在数据库中,所有共享表格被存储在一个表中,该表叫 ‘表池(Table pool)’。SAP 用共享表格存储系统数据。
簇表:
   簇表与共享表格类似。也是多对一的关系。多数簇表存储在一个叫 Table cluster的表中﹐当一些表有共用的PK,或数据被同步访问时,使用簇表。
以上是我从一份中文资料上摘抄的仅供大家参考!
2003-1-9 06:20 netzilla

簇表本身就是透明表,用se11可以看到,我接触比较多的簇表的应用是用来保存internal table 或一些structure, 简单说吧,有些数据对象的定义是比较规范的,比如合同拉等等,我们定义透明表来存储,但是有很多程序中的internal table and structure or whatever,变化很大,如果需要保存,从不能给每个都定义一个transparent table吧,所以只需要定义一个unique的key(这点很重要),然后把数据对象一股脑存进cluster table,就ok,需要访问的时候还要使用相同的key,值得注意的是在使用cluster table时,要了解unique key 的定义,而且一般来说存取都有相应的macro
2004-1-15 04:10 nomad

hoho,做HR的人都对Cluster Table很熟悉的,所有的time Evaluation Result和Payroll Run Result全都存在Cluster Table里。
其实通俗的说,Cluster Table就是把一堆数据按一定规则以序列形式存放在某一个“特别大”的“字段”里,将来再按照这个特定规则来读取。
提高性能,节省空间,捎带加强安全性,这就是Cluster Table的用途。

2004-1-26 17:41 cbwan542399

簇表
  各位可以查查数据库的书,它与透明表的差异在于是针对一组表来处理的,
从单个表去理解与透明表没有差异,但是多个表组成簇表,它们在物理上对主键只存储一遍,故对簇表的关联查询可以极大提高访问速度。

04-06-11 21:41  www.itpub.net
透明表可以连接查询,簇表只能通过简单的select查询,如bseg.
内表相当于数组,可以通过loop,read进行查询。
内表中的记录都是放在工作区中进行编辑和察看的。结构同内表。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值