Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 3rd, 2008, 08:22 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
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.

  #2 (permalink)  
Old July 4th, 2008, 12:01 PM
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

 AspNetGuy:
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.

peace95


========================
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.
  #3 (permalink)  
Old July 6th, 2008, 07:48 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AspNetGuy
Default

Peace95,

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?

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.