位图索引连接

时间:2015-04-08 01:19:08

标签: java database join bitmap

我正在使用java进行位图索引实现。我有两个文件 它们具有不同数量的元组。(两个文件大小不同) 这两个文件都具有相同的结构,部门ID与公共字段相同。 我需要在部门ID的两个字段中对元组执行连接。 我创建了一个矩阵,其中部门ID为行,行号为列 指数。如果部门ID用于特定的行号,则我指定一个 否则设置为0。

The output for the first file looks like:
Unique department ids are :

112
355
010
230

Default

0 0 0 0 0 0 0 
0 0 0 0 0 0 0 
0 0 0 0 0 0 0 
0 0 0 0 0 0 0 

row :>>0column :>>0
row :>>1column :>>1
row :>>2column :>>2
row :>>1column :>>3
row :>>3column :>>4
row :>>1column :>>5
row :>>0column :>>6
Time Taken : 47ms
Memory Taken (in bytes): 436480.0 bytes
Memory Taken (in MB): 0.416259765625 MB
Total number of columns =7
Total number of rows =4
{0=112, 1=355, 2=010, 3=230}
The new array is :::::
1 0 0 0 0 0 1 
0 1 0 1 0 1 0 
0 0 1 0 0 0 0 
0 0 0 0 1 0 0 

The output for the second file :
Free memory>>63.083763

Unique department ids are :
333
355
989
010
230

default 

0 0 0 0 0 
0 0 0 0 0 
0 0 0 0 0 
0 0 0 0 0 
0 0 0 0 0 
row :>>3column :>>0
row :>>0column :>>1
row :>>4column :>>2
row :>>2column :>>3
row :>>1column :>>4
Time Taken : 46ms
Memory Taken (in bytes): 436456.0 bytes
Memory Taken (in MB): 0.41623687744140625 MB
Total number of columns =5
Total number of rows =5
{0=333, 1=355, 2=989, 3=010, 4=230}
The new array is :::::
0 1 0 0 0 
0 0 0 0 1 
0 0 0 1 0 
1 0 0 0 0 
0 0 1 0 0 

我想在两个矩阵之间执行连接操作,但由于两个文件的矢量长度不同,我很困惑,我应该怎么做呢

0 个答案:

没有答案