Re: Datasets - Best approach to use?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 01/12/05

  • Next message: William \(Bill\) Vaughn: "Re: Storing word documents, spreadsheets... in SQL database"
    Date: Wed, 12 Jan 2005 13:32:52 -0800
    
    

    If the books told you to mirror your data (replicate would be better as
    mirroring makes everything backwards), then you got the wrong books. This is
    a widely discussed issue. First, when working with toy databases where there
    are a few tables and not many rows (a few thousand at most), then it does
    not make much difference what you do--especially if there is only one user.
    When you're trying to implement a serious DBMS where many people need to
    share the data, simply building a DataSet that contains the contents of a
    table won't work--not for long. It simply won't scale. Using ASP (or
    ASP.NET) makes the problem worse. In this case you're dealing with DataSets
    that are created and (by default) destroyed as soon as the page renders the
    HTML back to the client (browser). If you try to save these large DataSet in
    the Session state (or wherever), you'll choke the system before long.
    No, the approach to take is to create a DataSet that contains the
    information that the user needs NOW and work from there. When you create a
    DataAdapter, you can create action commands (UPDATE, INSERT, DELETE) into
    its infrastructure so that when you execute Update these commands make
    changes to the database. No, the bound controls won't call Update--you have
    to do that in your code. In an ASP application the bound controls also won't
    post the changes to the server-side DataSet--you'll have to do that in your
    code. The ONLY thing bound controls will do in ASP is to move the data from
    the inbound DataSet (DataTable) to the control so you can see the rows.

    I discuss these issues in far more depth in my book and so does David
    Sceppa.

    -- 
    ____________________________________
    William (Bill) Vaughn
    Author, Mentor, Consultant
    Microsoft MVP
    www.betav.com
    Please reply only to the newsgroup so that others can benefit.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    __________________________________
    "Dave Stumbles" <Dave Stumbles@discussions.microsoft.com> wrote in message 
    news:D8C8A27E-4C43-4E96-8153-EDC2D7ECBF56@microsoft.com...
    >I am writing a VB.NET 2003 web application to operate on my company's
    > intranet. It accesses data in an SQL Server database. I have developed a
    > couple of pages that display data successfully. However, there is one area
    > that I am having trouble getting a handle on, despite purchasing a couple 
    > of
    > Wrox books.
    >
    > Up until now, I have used a whole lot of data adapters and datasets to be
    > able to display my information. The data is stored in a very hierarchical
    > structured database. I now want to be able to edit, delete and add new
    > records to most of these tables. The data would be edited in datagrids.
    >
    > I have seen some information that indicates that having a 'mirror-image' 
    > of
    > the original database stored in a dataset is the way to go, ie this is
    > retrieved from the database, then modified and then sent back.
    >
    > My questions are:
    >
    > Is it best to have a single large dataset mimicking the tables and table
    > structure in the database?
    >
    > If so, how is this achieved effectively? I only seem to be able to bring
    > across a table at a time.
    >
    > Any help would be greatly appreciated.
    >
    > Dave.
    > 
    

  • Next message: William \(Bill\) Vaughn: "Re: Storing word documents, spreadsheets... in SQL database"

    Relevant Pages

    • Re: who does Casper scold so locally, whenever Alfred fills the old tape very wistfully
      ... She will simply comb cold and cares our weak, smart carrots in front of a ... mirror. ... How did Calvin irrigate under all the books? ...
      (rec.ponds)
    • Re: replication
      ... mode, when a session begins, the mirror server synchronizes the mirror ... database with the principal database as quickly as possible. ... substantial if the principal server is under a heavy work load or the ...
      (comp.databases.ms-sqlserver)
    • RE: Database Mirroring or Log Shipping?
      ... Log Shipping nothing but moving tlog from Primary to Secondary once restored ... "Because the mirror database is in a recovering state, ... snapshots are not an option for us b/c we have SQL 2005 STD. ...
      (microsoft.public.sqlserver.replication)
    • Re: A Question of design.
      ... | Daz wrote: ... |> checked against those in the database to confirm whether or not they ... | virtual books, and each book has an id. ... In your code you can check the FIS field for 0 or non-zero. ...
      (comp.lang.php)
    • Re: Server Advice Wanted.
      ... books and press material in general. ... than an ocr text file. ... imcremental backups etc much easier and will keep the actual database ... into chunks that your backup solution can handle, ...
      (borland.public.delphi.non-technical)