Wrox Programmer Forums
BOOK: Beginning ASP.NET 2.0 and Databases
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 and Databases by John Kauffman, Bradley Millington; ISBN: 9780471781349
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 and Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 3rd, 2008, 08:22 AM
Authorized User
Join Date: Apr 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AspNetGuy
Default When To Create Datasets

I have not been able to locate an article or tutorial that addresses this question so if you know where I can find an answer I would be greatly appreciative. This is a question regarding best practices for datasets.

I know what a dataset is and what a DataTable and TableAdapters are. I have done the exercises. I have completed a couple of tutorials regarding creating a Data Access Layer where a single dataset was used for the entire Data Access Layer. So my question is less technical and more philosophical or architectural in nature.

The question, "How many datasets should a project have?" is like asking how long is a string? But more to the point then, is the question, "when do you choose to create yet another dataset?"

Suppose you have a database with 50-80 tables. There are relationships among some of the tables. Do you use one dataset or many? What is the criteria for creating the next dataset? What do you use as criteria for limiting the number of tables in a dataset? Why would I put this table and that table into a dataset and not some other table?

Thanks to any and all who might answer this.

Old July 4th, 2008, 12:01 PM
Friend of Wrox
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts

Your question seem to be a bit confusing because it lacks descriptive database type information. For instance, in your question referencing the 50-80 tables in a database with relationships among some of the tables, you don't say whether it is a RDBMS (Relational Database Management System) or not. Without knowing the database type, the collection of tables could well be a Data Warehouse using a "Star" or "Snowflake" -Type schema. If that is the case, your questions would be null and void.

Outside of that, my following comments are based on the the definitions on page 10 of Chapter 1, Review of Terminology in the Beginning ASP.NET 2.0 and Databases. Review the definition of a DataSet, Data store and Database or RDBMS. Then turn to page 16 and review the section on "Nonrelational Stores of Data". A database, whether it is Nonrelational or Relational is a DataSet. So your Project may have multiple DataSets, based on project requirements.

A Relational Database consists of multiple tables and this collection of tables and their data is 1 DataSet. A Nonrelational Database is a data-file(data store) and 1 DataSet. An example of this type of database and data-file is an XL-file(Excel) and 1 DataSet. However an XL-Workbook, which consists of multiple XL-spreadsheets is still 1 DataSet.

Hope this helps.


Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
Old July 6th, 2008, 07:48 AM
Authorized User
Join Date: Apr 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AspNetGuy


Thanks for the information, but it doesn't really address my question. probably due to my poor communication skills.

In answer to your question about database, the database is a SqlServer database.

I can create one dataset when working with one or more databases. I may also create more than one dataset. I am not speaking of objects here, but rather dataset definitions. While I CAN have one dataset I MAY have more dataset definitions. The question I am posing, which comes from a wealth of ignorance on the topic, is not whether I CAN but whether I SHOULD create multiple dataset definitions? Are there any performance reasons or design reasons for creating multiple dataset definitions?

Thanks again for any help anyone might give?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create new dataset from two existing datasets wmoy C# 3 June 28th, 2005 09:33 AM
Datasets Louisa VB.NET 2002/2003 Basics 1 October 6th, 2004 07:38 AM
DataSets CodeMonkeys C# 1 September 7th, 2004 09:48 PM
Comparing DataSets. jitu ADO.NET 1 June 7th, 2004 11:18 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.