Is there a library for table arrays?

  • Thread starter Thread starter finaquant
  • Start date Start date
  • Tags Tags
    Arrays Table
Click For Summary

Discussion Overview

The discussion revolves around the need for a .NET library capable of reading and writing arrays of data tables from and to relational databases. Participants explore potential solutions and clarify the specific requirements for handling in-memory tables.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires about the existence of a .NET library for managing arrays of data tables in relational databases.
  • Another participant suggests using Microsoft's Entity Framework (EF) as a general-purpose Object-Relational Mapping (ORM) library, though they express uncertainty about the specific requirements.
  • A further response clarifies that the need is for persistence at the table level rather than field level, emphasizing the requirement for commands to read and write complete in-memory tables.
  • The participant outlines a specific use case involving cost and margin tables for yearly calculations, illustrating the desired functionality with example commands.
  • One participant mentions that they have not encountered such a library but believes it would be feasible to create one in .NET.
  • The original poster later states that they have extended their existing non-commercial library to include a class named Persistent Table Array to handle the required database operations.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the existence of a suitable library, with some suggesting alternatives and others proposing the development of a custom solution. The discussion remains unresolved regarding the availability of a pre-existing library.

Contextual Notes

The discussion highlights specific requirements for database operations involving in-memory tables, which may not align with typical ORM functionalities. There is also a mention of a custom solution being developed, indicating a gap in available resources.

Who May Find This Useful

Developers working with .NET who need to manage arrays of data tables in relational databases, particularly those focused on analytical operations and custom library development.

finaquant
Messages
8
Reaction score
0
Hello

For a software on which we are currently working we need a .net library for reading/writing array of data tables from/to relational databases.

Is there such a library for .net?

Tunc
 
Technology news on Phys.org
I am not sure exactly what you mean by "array of data tables", but if you have a "normal" .NET object model, then perhaps you can use Microsofts own Entity Framework (EF), which is a general purpose Object-Relational Mapping (ORM) library.
 
As far as I know, the Entity Framework is generally used for mapping object fields to table fields, in a sense, to achieve object persistence at field level.

What we need for our analytical table functions is slightly different. We want to store and read complete in-memory tables together with their instance information. Each table instance is an element of an array of tables. This is persistence at table level.

What we need is in principle simple read and write commands like the following:

write(TableName, Table, InstanceKey) : writes in-memory table Table into database

Table = read(TableName, InstanceKey) : reads in-memory table Table from database

For simplicity of understanding InstanceKey can be assumed to be a string and Table a DataTable object though they are both different types in our case. For example we use MatrixTable instead of DataTable for in-memory tables with a simplified data structure which is more proper for analytical operations.

Why table arrays? As an example assume we have separate cost and margin tables for each year in order to calculate price tables for each year. We could formulate this calculation as follows:

CostTbl2008 = read("cost_table", 2008);
MarginTbl2008 = read("margin_table", 2008);

PriceTbl2008 = tablemult(CostTbl2008, MarginTbl2008);
write("price_table", PriceTbl2008 , 2008); // store result for 2008 in database

Regards
Tunc
 
I have not heard of such a library, but it seems quite feasible to write such a library yourself in .NET.
 
Thanks.

We also couldn't find such a library; so we have extended our non-commercial library (finaquant protos) to include a class named Persistent Table Array which handles these database operations.

Tunc
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
19
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
13
Views
2K
  • · Replies 25 ·
Replies
25
Views
3K