M
M
Max Maximov2018-03-20 13:12:27
ORM
Max Maximov, 2018-03-20 13:12:27

Is there an ORM that supports partitioning?

There is a huge database with partitioning of 4 tables by date. It is necessary to add support for partitioning through ORM on .NET, preferably Entity Framework. Are there ready-made solutions? Or recommendations why you should not do it through ORM?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#, 2018-03-20
@mindtester

in general, this is a feature of the database and not an ORM
, decide on the database and love Google:
- MS SQL query partitioning allows you to quickly understand that in MS SQL, this feature is called partitioning
- and in approximately the same spirit, step by step, refine queries to search engines, as understanding grows, perhaps this will intersect with the Entity Framework somewhere (or maybe not)

A
Artem Smirnov, 2018-03-20
@artem-smirnov

Usually, this is not done through the ORM.
ORM is a high level of abstraction, it should not know which tables you have partitioned and by what rules. It must access the table, and if it is partitioned, then the query must contain appropriate restrictions that will allow at the database level to apply operations from the query to a specific table partition that satisfies the constraints from this query.
At the database level, this is usually resolved by creating a view that abstracts the partitioned table that the ORM will work with, and creating triggers for operations with this view.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question