Database Reference
In-Depth Information
If the foreign key table is sorted on the foreign key attribute value, then we do
not require Tuple-index-map for that relationship. In that case, logical record-id
of the PK-map will be the actual record-id of the foreign key table. For example,
in Figure 1, PART and PARTSUPP tables are sorted on partkey attribute.
Hence, PartKey-map does not require Tuple-index-map. Similarly, in column-
oriented databases, if at least one projection of the table is sorted on foreign key
attribute, then the logical record-id of the PK-map will be the actual foreign key
record-id.
3.2 TPC-H Star Schema
Star and Snowflake Schema representations are commonly used in read-optimized
Data Warehouses. In the rest of this paper we use the star schema from TPC
BENCHMARK H Standard Specification Revision 2.15.0 (Figure 1) for analy-
sis and performance study. Figure 1 is the schema of an industry, which must
manage, sell and distribute its products worldwide.
With the TPC-H schema of Figure 1, we need to create 6 PK-maps NationKey-
map, SuppKey-map, PartKey-map, PartsuppKey-map, CustKey-map and
OrderKeymap. Structure of NationKey-map and SuppKey-map are shown in Ta-
ble 1. We also need 5 Tuple-index-maps (like Table 2) for relationships between
each of the following tables: nation
↔
↔
↔
supplier, nation
customer, supplier
partsupp, customer
↔
orders table and partsupp
↔
supplier.
Through performance study of our previous work [17], we know that the size
of the maps would usually be around 10% to 12% of the actual data size. Size
can be calculated using below formulas.
n
Size of PK map
=
S
1
+
S
2
[
i
]+
c
(1)
i
=0
Size of Tuple index map
=(
Number of rows in FK Table
)
∗ S
2
(2)
where,
S
1
is the size of the primary key and
S
2
is the size of logical record id
(32/64 bit depending on the type of processor)
REGION
(
regionkey
, name, comment)
NATION
(
nationkey,
name,
regionkey
, comment)
SUPPLIER
(
suppkey
, name, address,
nationkey
, phone, acctbal, comment)
CUSTOMER
(
custkey,
name, address,
nationkey
, phone, acctbal, mktsegment, comment)
PART
(
partkey,
name, mfgr, brand, type, size, container, retailprice, comment)
PARTSUPP
(
partkey, suppkey
, availqty, supplycost, comment)
ORDERS
(
orderkey
,
custkey
, orderstatus, totalprice, orderdate, order-priority, clerk, ship-
priority, comment)
LINEITEM
(
orderkey,
partkey, suppkey,
linenumber
, quantity, extendedprice, discount,
tax, returnflag, linestatus, shipdate, commitdate, receiptdate, shipinstruct, shipmode,
comment)
Fig. 1.
TPC-H Benchmark Schema [20]
Search WWH ::
Custom Search