Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Best Practice - Table Adaptors

Posted on 2011-09-09
4
Medium Priority
?
376 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Screencast - Getting to Know the Pipeline
Suggested Courses

610 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