Additional
Syndicate
Subscribe to our News, Blogs and Updates
 
AnyDAC vs kbmMemTable, MemTableEh, dxMemData, ClientDataSet
Posted by Support [Apr 02, 2007]

AnyDAC have all the features of these inmem datasets and more. And doing the job with speed of kbmMemTable or ... better.



So, what I am talking about ? General architecture overview, you can see here. And I am talking about AnyDAC DatS layer.

Architecture

DatS layer is actually In-Memory Data Storage with limited capabilities of a relational database engine. DatS layer is DBMS independent. Moreover it may be used in the same time with many data sources, including different DBMS brands. The following diagram shows the simplified object model of DatS layer:

DatS layer class diagram

AnyDAC DatS layer by architecture is similar to the ADO.NET ®. Most information sources about Ado.Net may be successfully used for DatS layer. The table below lists the points in which the two products differ.

Feature

Ado.Net

DatS layer

Destruction of objects.

Implicit. It is responsibility of garbage collector.

Explicit. Programmer is responsible for destruction of “root” objects (like a manager, table). “Root” object will destroy “sub” objects (like tables in manager, columns in table, etc) automatically.

Class names.

DataXXXX

TADDatSXXXX. DatS follows AnyDAC naming conventions.

 

DataSet

TADDatSManager

Data types.

Not limited to strict set.

Defined by TADDataType enumeration type. This is because of differences between Delphi RTL and .NET CLR.

Collections.

Support of ICollection and .Net foreach keyword.

DatS supports:
property ItemI[AIndex: Integer]: TADDatSXXXX;
property ItemS[AIndex: String]: TADDatSXXXX;
property Count: Integer;

 

More details you can find in AnyDAC_Architecture guide.

Features

Here I want to show general feature list. It is far from to be completed:

  • Strong object design
  • Storage manager
    • Unlimited number of tables per storage 
    • Relations accross tables
    • History of changes across all rows in all tables
    • Unlimited undo changes support
  • Tables
    • Unlimited number of columns per table
    • Unlimited number of constraints per table
    • Unlimited number of views per table
    • Importing rows from other tables
    • History of changes across all rows
    • Unlimited undo changes support
    • Referential integrity between tables
  • Columns
    • Any of Delphi TFieldType data type
    • Autoincremental columns
    • Calculated by expression default values
    • Calculated by expression or by callback columns
  • Constraints
    • Primary key
    • Unique keys
    • Foreign keys
    • Checks
  • Rows
    • RowID
    • Each row is represented by object
    • Row change history
    • Associated error after posting changes to DB
  • Views
    • Multiple sorting and filtering mechanisms per view
    • 8 effective filtering mechanism kinds
    • Filtering and seaching use sorted views
    • Views on view or table
    • Aggregate values

TADClientDataSet

TADClientDataSet is just TDataSet interface to DatS. And actually, one TADClientDataSet is one or more tables and zero or more views. Tables are used to store data. Views are used to sort, filter, range, process updates and to build indexes and aggregates.

With TADClientDataSet you can create in-memory datasets, using similar to TClientDataSet way:


  // create dataset
  with ADClientDataSet1.FieldDefs do begin
    Add('F1', ftString, 255);
    Add('F2', ftDateTime);
    Add('F3', ftLargeint);
  end;
  ADClientDataSet1.CreateDataSet;

  // append record to dataset
  with ADClientDataSet1 do begin
    Append;
    Fields[0].AsString := 'qweqwe';
    Post;
  end;

You can use directly DatS table and views associated with TADClientDataSet:

  // iterate through all DatS view rows and read F1 field value
  for i := 0 to ADClientDataSet1.SourceView.Rows.Count - 1 do
    ADClientDataSet1.SourceView.Rows[i].GetData('F1')

Or you can create, fill and adjust DatS table and view your self. And then attach TADClientDataSet to them:

  ADClientDataSet1.AttachTable(oTable, oView);
  ADClientDataSet1.Open;

All that gives you almost unlimited flexibility of DatS and standard TDataSet interface to DatS. Neither of existing in-memory dataset gives you that flexibility. More examples, you can find in AnyDAC\DEMO\DatS Layer folder.

Speed

How fast is DatS and TADClientDataSet on top of it ? Beside the fact that AnyDAC is one of the fastest data access engines. It is ... fastest in-memory data engine. Check your self:

 

AnyDAC inmem benchmark results

Conclusion

Few reasons to use AnyDAC TADClientDataSet:

  • if you are using AnyDAC to access your DBMS, then you already have TADClientDataSet in your application. You just need to start to use it;
  • if you need unlimited flexibility with in-memory dataset, then AnyDAC will give it to you;
  • if you need the best speed at handling your in-memory data, then AnyDAC will give it to you;
  • AnyDAC is freeware and very high stable.

 

If you are not sure, how effective will be our technical support, then you can order high priority technical support.


LIST OF COMMENTS


1/10. Title bug
Posted by Прохожий - Apr 02, 2007
Website
>>AnyDAC vs kbmMemTable, MemTableEh, dxMemData, ClientDataSet В заметке потерялась MemTableEh.

2/10. Все в переди
Posted by Support - Apr 02, 2007
Website

Я планирую обновить этот блог. MemTableEh будет в следующей редакции. Пока я хотел показать, что при уникальных возможностях TADClientDataSet обладает и уникальной производительностью для такого набора возможностей.


3/10. AnyDAC vs kbmMemTable, MemTableEh, dxMemData, ClientDataSet
Posted by Othelo - Apr 03, 2007
Website
Hi,

Is there any method like kbmMemtable's LoadFromDataSet in ADClientDataSet ?

TIA
HJ

4/10. а как насчет Корелабовского VirtualTable?
Posted by Dev - Apr 03, 2007
Website

а как насчет Корелабовского VirtualTable?

http://crlab.com/vtable/


5/10. SaveTo/LoadFrom stream
Posted by Support - Apr 03, 2007
Website
This is under development

6/10. VirtualTable
Posted by Support - Apr 03, 2007
Website

Возможно добавлю в бенчмарк.


7/10. benchmark app
Posted by vavan - Apr 04, 2007
Website
хотелось бы сгрузить сам бенчмарк. спасибо

8/10. Все доступно
Posted by Support - Apr 05, 2007
Website

Downloads -> AnyDAC -> AnyDAC Benchmark for in-memory datasets
Если вы будете дополнять датасеты и/или тесты, то просьба ваш код прислать нам.


9/10. it's more easy with link
Posted by Diman - Jul 31, 2009
Website
a link to another bench by developpers of kbmem I see that all the developpers of components are not ealy fair I must do the test by my self 
http://www.components4programmers.com/articles/performancecomparisonofkbmmemtab.htm

10/10. стоит добавить RxMemoryData
Posted by L_G - Nov 27, 2011
Website
Для полного комплекта не помешает включить в сравнение и RxMemoryData (не путать с их же MemoryTable!): он тоже оказывается быстрым, быстрее, чем MemTableEh, по крайней мере.

Add Comments