DataSet creation and usage

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

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
 
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)
____________________________________________________________________________________________
 
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)
___________________________________________________________________________­_________________












- Show quoted text -

Thank you for your comments and suggestions Mr. Vaughn, I appreciate
your time.
 
Back
Top