1.1.1

Table Of Contents
Chapter 9
Designing vFabric SQLFire Databases
Unlike in traditional database design, SQLFire requires the designer to analyze the common access patterns and choose
a partitioning strategy that results in queries that are pruned to a single partition. In addition, fact tables may need to
be replicated in order to make data available for join operations against partitioned data. This chapter describes the
basic table design principles that you can use to achieve linear scaling with SQLFire.
Design Principles of Scalable, Partition-Aware Databases
A key design principle for linear scaling is a partitioning strategy that allows most data access (queries) to be
pruned to a single partition, thus avoiding expensive locking or latching across multiple partitions during query
execution.
In a highly concurrent system having thousands of connections, multiple queries are uniformly spread across
the entire data set (and therefore across all partitions), and increasing the number of data stores enables linear
scalability. Given sufcient network performance, more connections can be supported without degrading the
response time.
Note: SQLFire supports distributed queries by parallelizing the query execution across data stores.
However, each query instance on a partition can only join rows that are collocated with the partitioned
data. This means that queries can join rows between a partitioned table and any number of replicated
tables hosted on the data store with no restrictions. But queries that join multiple, partitioned tables have
to be ltered based on the partitioning key. Query examples are provided in this section and in Query
Capabilities and Limitations on page 710.
Identify Entity Groups and Partitioning Keys
In relational database terms, an entity group corresponds to rows that are related to one another through foreign
key relationships. Members of an entity group are typically related by parent-child relationships and can be
managed in a single partition. To design a SQLFire database for data partitioning, begin by identifying "entity
groups" and their associated partitioning keys.
For example:
In a customer order management system, most transactions operate on data related to a single customer at a
time. Queries frequently join a customer's billing information with their orders and shipping information. For
this type of application, you partition related tables using the customer identity. Any customer row along with
their "order" and "shipping" rows forms a single entity group having the customer ID as the entity group identity
(partitioning key). Partitioning related tables using the customer identity enables you to scale the system linearly
as you add more members to support additional customers.
In a system that manages a comprehensive product catalog (product categories, product specications, customer
reviews, rebates, related products, and so forth) most data access focuses on a single product at a time. In such
a system, you would partition your data on the product key.
51