?
Solved

Best Practice - Table Adaptors

Posted on 2011-09-09
4
Medium Priority
?
373 Views
Last Modified: 2012-05-12
I would just like to ask the experts here on the exchange how they prefer to setup their Dataset/TableAdaptors.

I was following along here....

http://msdn.microsoft.com/en-us/library/aa581778.aspx

... and it looks as though the author of this article places all his Tables into a single DataSet.xsd file.  So he has a single Northwind.xsd file and he places 4 table adapters within the DataSet.

Is this practical for larger scale applications?  

I have 30+ tables in my Database and I'm wondering if it makes more sense to have individual DataSet.xsd files for each Table versus having a single xsd file with 30+ adaptors in it.

I'm really just wonder what you guys do and how you handle situation like mine.

Thanks!
0
Comment
Question by:cdemott33
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36513439
I do not like typed datasets at all. I use plain DataTable most of the time and only use a Dataset when I am dealing with multiple related datatables.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 36514860
The role of the DataSet is to reproduce a subset of your database, relations and all, in memory.

A DataSet is thus a collection of tables with relations. The role of the Dataset is to manage those relations. A DataSet with only one table is one of the stupidest things that exist, but unfortunately, we see those popping everywhere.

If you are manipulating a lot of tables, but there is no relation between them, a DataSet is a useless collection of individual tables. A lone TableAdaptor for each table is then the way to go.

------ BUT ------

CodeCruiser is absolutely right.

I would even go further, Typed DataSets and TableAdapters are useless pieces of junk. Yes, they appear useful at first sight. And they are already obsolete. Do you know that (i might be off by one version for the following, but the idea is there).

Typed datasets appeared in Visual Studio 2002.
In Visual Studio 2005, they were replaced by Table Adaptors.
Then came Visual Studio 2008, where LINQ was supposed to be a lot better.
But in Visual Studio 2010, every one (Microsoft first) is yelling that you should use Data Entities instead.
From what we see now, this will still hold in 2012. Ouf, a little reprise.
But god knows what will replace Data Entities in 2014.

And could we got further back by telling about the precursors of those "do it fast" database technologies? The DAOControl of VB3 what replaced by the ADOControl in VB4, and this one did not make it to .NET.

DataTable where there in 2002, 2003, 2005, 2008, 2010 and will still be there in 2012. They won't disappear, because they are the basis of all the other technologies.

Instead of working with things that seems very easy to use but get replaced everytime there is a new version of the framework, all of which are simply a cover over DataTables, why don't you go straight to the core. It takes a little more code, I agree. But you have more control over what is happening. And over the years, you always work with the same technology, so you learn to master it. This beats having to learn a new technology every 2 years, having to change to a new one once you start to master the previous one. And once again, remember that all those technologies are but a front over the basic : the DataTable.

Work just a little more now, so that you do not have to work a lot later trying to debug things whose inner working is hidden from you. Work just a little more now so that you won't have to master 5 different technologies to understand an application that has evolved through all those stupid tools. Go for the DataTable.

Editorial by Jacques Bourgeois alias James Burger.

0
 

Author Comment

by:cdemott33
ID: 36520461
Hi James - Thank you so much for your feedback.  Can you recommend a good article(s) that provide excellent tutorials for creating DataTables?
0
 
LVL 40
ID: 36520611
Hi cdemott33.

I learned from the framework documentation and trial and error some 12 years ago, so I do not know of a good article. I could search for you, just as you could search yourself. But not knowing you, you would be better than me at finding an article suited to your level of expertise and you background.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question