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 7836605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:13:42+00:00 2026-06-02T14:13:42+00:00

I am trying to figure out the best database/data architecture approach for a system

  • 0

I am trying to figure out the best database/data architecture approach for a system where I need changes to raw “lower level” tables to, ideally, automatically propagate up various different tables that store views based on the underlying data.

Let me give an simplified example.

Imagine I have the following tables:

  1. various table of food ingredients and prices at different supermarkets
    • eg. a Safeway table that has { ketchup: 1.19, butter: 0.99}, and a Walmart table with { eggs: 1.99, butter: 0.79}
  2. a table that stores the cheapest location for each ingredient
    • eg. { butter => walmart: 0.79}
  3. a table that stores recipes with the cheapest price of the recipe (made up from the cheapest prices of ingredients from table 2.
    • eg. { “ketchupy-egg-breakfast => total: 3.97, ingredients => butter: 0.79, eggs: 1.99, ketchup: 1.19
  4. a table that stores the cheapest a breakfast recipe among several alternative recipes.

Now imagine I have workers going out and updating the values of table (1) on an hourly basis. Is there a database design or architecture that would force an updating of any entries in table two that rely on something that changed in table 1, and similarly would propagate changes onwards to table 3 and table 4. I imagine that can be implemented in code through a series of cascading jobs but I was wondering if there was a less complex and more elegant way of doing that.

Thanks for your help.

  • 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-06-02T14:13:44+00:00Added an answer on June 2, 2026 at 2:13 pm

    Looks like a well fit for the CQRS pattern. You should have just one data source when storing items.

    From the linked article:

    CQRS stands for Command Query Responsibility Segregation. It’s a pattern that I first heard described by Greg Young. At its heart is a simple notion that you can use a different model to update information than the model you use to read information.

    CQRS helps you take in one kind of information (Update model) and then transform it into something which you can query (Read/query model).

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

Sidebar

Related Questions

I'm trying to figure out the best practice to setup hierarchy data that i
I'm trying to figure out the best way to setup some tables in my
I'm trying to figure out the best practices for storing user data on a
I'm trying to figure out the best way to setup my database and models
I'm trying to figure out the best way to move/merge a couple tables of
I'm trying to figure out the best way to normalize the following data set,
Trying to figure out the best way to set up collection lists for users
Trying to figure out the best way to do this: Should I do something
I'm trying to figure out the best way to do error logging in rails
I am trying to figure out the best way to bind to an unrelated

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.