Large DataSet SubClass Pros and Cons

Description

For large dataset capabilities, we might need to make the read-only MemoryMapDataSet a subclass of DataSet.

Pros

  • Polymorphism
    • DataSet ds = new MemoryMapDataSet("file.txt");

Cons

  • Inheritance
    • Methods that modify DataSet will need to be disabled?
    • Keep some of the same interface.
    • Will need to change parts of the interface.

Alternatives

Interface instead of SubClass -- IDataSet

    • List common methods between DataSet and MemoryMapDataSet
      • GetDataPoint(int, int)
      • NumCols
      • NumRows
      • Name
      • GetDataPoint(int, int)
      • GetColumnName(int)
      • GetRowName(int)
      • GetRowId(int)
      • GetColumnIndexFromName(string)
      • GetRowIndexFromId(int)
      • Log ?
        • DataSet.Log(int) -> Log(string, int)
        • MemoryMapDataSet.Log(string, int)
      • Average ?
        • DataSet.Average(DataGrouping [, bool]) -> add Average(string, DataGrouping [, bool])
        • MemoryMapDataSet.Average(string, DataGrouping [, bool])
    • MemoryMap implementation of DataSet
      • FileStream
      • StreamReader
      • Buffer
      • Other DataSet members for column names and row ids/names, etc.
    • Other TODO:
      • Read-ahead optimization to reduce FileStream.Seek() usage
      • Vary buffer size based on DataSet size (number of columns)
    • Explicit Interfact Implementation (see MSDN tutorial)
      • Methods that can only be called with an interface reference to the object.
    • IDataSet ds = new DataSet("file.txt");
    • IDataSet ds = new MemoryMapDataSet("file.txt");

Edit | Attach | Print version | History: r7 | r6 < r5 < r4 < r3 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r5 - 20 Apr 2005, WillGray
 

This site is powered by FoswikiCopyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback