none
DataSets vs. DataReaders RRS feed

  • Question

  • Hi, I work with Visual Basic 2008 Professional Edition and Oracle Database 10g Express Edition as the data server to manage a database of document management. 

    The fields that make up each document template is stored in the database, there are about 50 document templates for each document template, between 10 to 20 records of fields associated with these templates. To generate a new document from a document template, with dataReaders retrieve specific fields of the template you want to use, my question is: If instead of using DATAREADERS,  DataAdapter and DataSet  for a better use instead of continually query these records in the database, that is, when you start the program lod load all data from all document templates in a DataSet. 

    I know that is recommended only DataReaders  for query data and that the dataset is used only when modifying the database.
    The database is used in a networked environment from 3 to 10 users. 

    Please your opinion. 

    Roberto.

    Developer software
    Sunday, October 12, 2008 8:59 PM

Answers

  • Go with whatever is easiest.  Your data size is too small to make much difference.

    DataReaders are best when you're reading through the data for some processing purpose and not storing it locally at all.

    -Ryan
    Tuesday, October 14, 2008 4:18 PM
  • DataSet is easy to use.
    DataReader is faster (you can modify the data after with an OracleCommand).

    I rather create the business classes myself and populate them with a datareader. You don't need to query the database everytime. Store the information in classes.
    Puzzles, brain teases, riddles, enigmas: http://www.toysforthebrain.com
    Tuesday, October 14, 2008 7:56 PM

All replies

  • Go with whatever is easiest.  Your data size is too small to make much difference.

    DataReaders are best when you're reading through the data for some processing purpose and not storing it locally at all.

    -Ryan
    Tuesday, October 14, 2008 4:18 PM
  • DataSet is easy to use.
    DataReader is faster (you can modify the data after with an OracleCommand).

    I rather create the business classes myself and populate them with a datareader. You don't need to query the database everytime. Store the information in classes.
    Puzzles, brain teases, riddles, enigmas: http://www.toysforthebrain.com
    Tuesday, October 14, 2008 7:56 PM
  • Thank you very match. You refer to Collections? This more  increase the performance?

    Roberto.

    Developer software
    Thursday, October 16, 2008 2:44 AM
  • you can also check this one out would be very much useful for you in the future:


    Prateek Regmi Blog for Programmers
    Friday, October 17, 2008 5:24 AM