<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AboutCached.aspx.cs" Inherits="MyTunes.Cached.About" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:Label ID="lblHeader" runat="server" Font-Bold="True" 
            Text="Advantages and Disadvantages of the Cached Dataset"></asp:Label>
    </p>
    <h3>Advantage #1: performance</h3>
    <p>
        Since the entire database is cached in memory during the application startup 
        process, subsequent visits will be much faster.&nbsp; The database will be 
        cached automatically again should it be dropped by the server due to memory 
        requirements.</p>
    <h3>Advantage #2: Dataset relations and expression columns</h3>
    <p>
        The Dataset class provides a graphical way to add both foreign key and 
        calculated columns to the data tables very easily.&nbsp; This is especially nice 
        considering the dataset can be created from subsets of a much larger database.&nbsp; 
        Expression columns provide a powerful alternative to writing lots of code for 
        many common operations done with parent-child tables.</p>
    <h3>Disadvantage #1: Memory Usage</h3>
    <p>
        Caching the entire database may seem extreme, but in this case the number of 
        records is relatively small and makes sense until the database grows.&nbsp; Once 
        that happens, you should try to cache a smaller dataset at the Session level 
        instead.&nbsp; That dataset should only include data needed to satisfy the 
        current user&#39;s request.&nbsp; For example, once a customer logs in, you might 
        cache a a dataset holding their account and all recent order history.</p>
    <h3>Disadvantage #2: More Code</h3>
    <p>
        The Global class obviously become more complex in this type of scenario.&nbsp; 
        Plus you probably still need to create a Business Logic Layer with this type of 
        design, but remember more code doesn&#39;t always means slower performance.</p>
</asp:Content>
