Re: One or many DataSet
- From: "Sahil Malik [MVP]" <contactmethrumyblog@xxxxxxxxxx>
- Date: Thu, 27 Oct 2005 23:41:40 -0400
Here is a quote from Chapter 14 of my book ----
"So what is a good size of a DataSet? This question is just as difficult as
how much butter on a toast is enough. While seemingly simple, the exact
boundaries cannot be clearly defined.
As a rough yardstick, you can say that a large single table (why not just
use a DataTable?), two medium sized tables, or three small tables should be
a good guideline in most situations. Though, it is perfectly acceptable to
bend these rules, if you know what you are doing. Do remember however, the
structural complexity of the DataSet hurts performance more than the sheer
size of it."
> Then I have one Table (Table2) with two different PrimaryKeys depending
> on witch Grid I want to display my data in.
<-- How can one table have two primary keys?? :-/
> My tables have quite a lot of data. When I fill my Datasets with data
> from the database, can I choose witch table in the DataSet I want to
> fill or do I have to fill the whole DataSet at once?
You can certainly choose.
> Is it best practice to keep the amount of DataSets small but with many
> tables or it is best practice to have many DataSets but a small amount
> of tables in each one of them?
See the quote from my book. The reason a "best practise" doesn't exist on
this, is because .. it truly depends on your situation. Just remember, a
dataset is not a database, and it shouldn't be abused as one either. Please
also read -
http://codebetter.com/blogs/sahil.malik/archive/2005/08/04/130264.aspx
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------
<gjetthvemjeger@xxxxxxxx> wrote in message
news:1130416544.685591.94310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> I am working with WB.NET and SQL Server.
> I have some trouble grasping what a DataSet in VB.NET is. Do the
> DataSet mirror the whole database used as the data store for one
> application or is it recommended to use multiple Dataset for this
> database (one application).
>
> Example:
> My DataSet have 3 tables: Table1, Table2 and Table3.
> Table2 has 2 columns, CustomerID and OrderID
> Table1 has 1 column CustomerID
> Table3 has 1 column OrderID.
> For GridList1 I need to define the CustomerID as the PrimaryKey in
> Table2 and link it to Table1's CustomerID
> For GridList2 I need to define the OrderID as The PrimaryKey in Table2
> and link it to Table3's OrderID.
>
> Then I have one Table (Table2) with two different PrimaryKeys depending
> on witch Grid I want to display my data in.
>
> Do this work or do I have to make two different DataSets, one for
> Table1 and Table 2 and one for Table2 and Table3?
>
> My tables have quite a lot of data. When I fill my Datasets with data
> from the database, can I choose witch table in the DataSet I want to
> fill or do I have to fill the whole DataSet at once?
>
> Is it best practice to keep the amount of DataSets small but with many
> tables or it is best practice to have many DataSets but a small amount
> of tables in each one of them?
>
>
> Thanks in advance :o)
>
.
- Prev by Date: RE: SQL Server Raiserror and .NET SqlDataAdapter
- Next by Date: Re: ADO.Net Best Practices Validation Tool
- Previous by thread: Re: One or many DataSet
- Next by thread: Re: One or many DataSet
- Index(es):