Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6348969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:31:22+00:00 2026-05-24T21:31:22+00:00

For example, our application tracks animal movements and prices for a farm. To get

  • 0

For example, our application tracks animal movements and prices for a farm. To get the current stock count the simplest solution is to have a starting number, then add up all the movement in and out until we have a current number. But this is memory intensive and gets slower and slower as the number of movements grows year after year.

We don’t have the luxury of “freezing” a year so it can no longer accept changes, the system must be able to handle changes to movements at any point in time, then show the updated numbers in real time.

This is not just stock numbers; we have to track a large number of variables like this and write reports for each period (day, week, month, year) that include summary calculations based on these variables.

What is the most common, preferred, “best”, fastest, elegant way to handle data streams that cross multiple years for calculation and reporting purposes? How would the database design and the architecture relate in this scenario (i.e. would using an ORM be fine as long as the database schema was well designed?). The critical requirements here are optimal performance and real-time availability.

I have seen in large scale systems thus kind of work is split up into time slices, e.g. week, month, year aggregate tables. I am particularly interested if there is a common design pattern for solving this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:31:23+00:00Added an answer on May 24, 2026 at 9:31 pm

    I would aggregate in the DB, as that’s usually something they are very good at.

    Have a look at OLAP (vs OLTP) database design.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our application we have an object that receives attributes at runtime. For example,
Our application has many controls that are created dynamically. For example, a navigation pane
In other languages (for example C#)we have a data directory (directory that our program's
We have several modules in our application. I have a project with a group
We have an ASMX web service which we invoke from our ASP.NET application using
in our application we have some kind of online help. It works really simple:
We have an application that handling our own message - a timered procedure read
In our application we are caching some frequently used data. Recently we have developed
In our application we have number of AggregatorTypes (idea copied from SQL Server) i.e.
I follow this pattern to organize my js application. As that example says our

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.