PC Review


Reply
Thread Tools Rate Thread

DataSet creation and usage

 
 
Robert
Guest
Posts: n/a
 
      15th Nov 2008
Hello-

I rewriting the UI of a very simple database composed of 20 tables.
Using VS2008 WinForms and would like to use strongly-typed DataSet.

Everything I find by way of tutorials and help suggests I should
create 1 giant DataSet with all the tables in the database within it.
Then use that DataSet in my forms. I'd prefer to do manual
databinding only because it seems easier to swap out the database
later, if need be. Maybe that premise is nonsense...

My question is, shouldn't I just create a DataSet (and its
relationships, constraints, etc) for those tables I immediately in the
Form I am writing? For example, if I have a Form displaying 'Parents'
and their 'Children', why wouldn't I create a strongly-typed DataSet
named say "ParentChildren" with ONLY the Parents and Children, and the
foreign key relationship defined? It seems smaller and tighter than a
single-giant DataSet with the entire database defined in it.

When I look at my project so far, I have a single giant DataSet object
but am wondering if it'd be better to have 30 smaller ones, defined as
necessary for the Forms that use them.

Any suggestions or pointers to resources which would help?

Best Regards,
Robert
 
Reply With Quote
 
 
 
 
William Vaughn \(MVP\)
Guest
Posts: n/a
 
      16th Nov 2008
While (too) many demos lead one to think that you need to create a
TableAdapter that contains all of the tables in the database (with all of
the rows). Sure, this works for a toy database application--like the one you
create for a single-user application but no, it does not make sense for
serious multi-user applications. I discuss the realities of application
design using these tools in my book. I'm sure it will help.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________



"Robert" <(E-Mail Removed)> wrote in message
news:3404a77f-756c-4bd1-9e75-(E-Mail Removed)...
> Hello-
>
> I rewriting the UI of a very simple database composed of 20 tables.
> Using VS2008 WinForms and would like to use strongly-typed DataSet.
>
> Everything I find by way of tutorials and help suggests I should
> create 1 giant DataSet with all the tables in the database within it.
> Then use that DataSet in my forms. I'd prefer to do manual
> databinding only because it seems easier to swap out the database
> later, if need be. Maybe that premise is nonsense...
>
> My question is, shouldn't I just create a DataSet (and its
> relationships, constraints, etc) for those tables I immediately in the
> Form I am writing? For example, if I have a Form displaying 'Parents'
> and their 'Children', why wouldn't I create a strongly-typed DataSet
> named say "ParentChildren" with ONLY the Parents and Children, and the
> foreign key relationship defined? It seems smaller and tighter than a
> single-giant DataSet with the entire database defined in it.
>
> When I look at my project so far, I have a single giant DataSet object
> but am wondering if it'd be better to have 30 smaller ones, defined as
> necessary for the Forms that use them.
>
> Any suggestions or pointers to resources which would help?
>
> Best Regards,
> Robert


 
Reply With Quote
 
Robert
Guest
Posts: n/a
 
      21st Nov 2008
On Nov 15, 9:02*pm, "William Vaughn \(MVP\)" <bil...@NoSpamBetav.com>
wrote:
> While (too) many demos lead one to think that you need to create a
> TableAdapter that contains all of the tables in the database (with all of
> the rows). Sure, this works for a toy database application--like the one you
> create for a single-user application but no, it does not make sense for
> serious multi-user applications. I discuss the realities of application
> design using these tools in my book. I'm sure it will help.
> --
> __________________________________________________________________________
> William R. Vaughn
> President and Founder Beta V Corporation
> Author, Mentor, Dad, Grandpa
> Microsoft MVP
> (425) 556-9205 *(Pacific time)
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> ___________________________________________________________________________*_________________
>
> "Robert" <LR...@LYCOS.COM> wrote in message
>
> news:3404a77f-756c-4bd1-9e75-(E-Mail Removed)...
>
>
>
> > Hello-

>
> > I rewriting the UI of a very simple database composed of 20 tables.
> > Using VS2008 WinForms and would like to use strongly-typed DataSet.

>
> > Everything I find by way of tutorials and help suggests I should
> > create 1 giant DataSet with all the tables in the database within it.
> > Then use that DataSet in my forms. *I'd prefer to do manual
> > databinding only because it seems easier to swap out the database
> > later, if need be. *Maybe that premise is nonsense...

>
> > My question is, shouldn't I just create a DataSet (and its
> > relationships, constraints, etc) for those tables I immediately in the
> > Form I am writing? *For example, if I have a Form displaying 'Parents'
> > and their 'Children', why wouldn't I create a strongly-typed DataSet
> > named say "ParentChildren" with ONLY the Parents and Children, and the
> > foreign key relationship defined? *It seems smaller and tighter than a
> > single-giant DataSet with the entire database defined in it.

>
> > When I look at my project so far, I have a single giant DataSet object
> > but am wondering if it'd be better to have 30 smaller ones, defined as
> > necessary for the Forms that use them.

>
> > Any suggestions or pointers to resources which would help?

>
> > Best Regards,
> > Robert- Hide quoted text -

>
> - Show quoted text -


Thank you for your comments and suggestions Mr. Vaughn, I appreciate
your time.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dataset Creation Using Programmatically CypherDrive Microsoft ADO .NET 6 29th Aug 2008 09:41 AM
Dataset creation problem......... sendtobiren@gmail.com Microsoft ADO .NET 2 31st Jan 2006 04:17 PM
Visual Dataset Creation in ASP.NET 2005 Craig Microsoft ASP .NET 0 1st Jan 2006 04:19 PM
Visual Dataset Creation in ASP.NET 2005 Craig Microsoft Dot NET 0 1st Jan 2006 04:19 PM
dataset creation =?Utf-8?B?QnJhZA==?= Microsoft ASP .NET 1 15th Nov 2005 01:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:57 AM.