Databases Reference
In-Depth Information
processing overhead; however, this may not always be the case. Be sure to carefully evaluate your database design to
determine which tables, if any, can take advantage of parallel execution.
Figure 9-12. Excluding the Document field from the SELECT
Working with Partial Shards
Note that building a shard isn't an all-or-nothing approach. You can easily create a partial shard for a set of tables.
Depending on how your code is structured, you may or may not need to build logic that understands sharding,
depending on which tables you need to access. Sharding logic is best built in a data access layer (DAL), where the
physical organization of tables is separated from the organization of business objects.
For example, you can design an application that consumes business objects directly. These business objects in
turn consume command objects, which are specialized routines smart enough to load data in memory structures
by calling execution objects. Figure 9-13 shows the Authors object calling two command objects that load data from
two separate libraries: the standard ADO.NET library and the shard library built in this chapter. The complexity of
determining which library to call is deferred to the lowest level possible, protecting the application and business
objects from database structural changes.
 
Search WWH ::




Custom Search