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

  • Home
  • SEARCH
  • 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 992131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:13:00+00:00 2026-05-16T06:13:00+00:00

i have some specific question to solve but i can not think. I have

  • 0

i have some specific question to solve but i can not think.

I have 5-6 statements that I need to store in my database. This system like a news feeds.

  1. Statement 1 : A installed this website.
  2. Statement 2 : A added store R in provinceX
  3. Statement 3 : B reviewed store R
  4. Statement 4 : A edited store R
  5. Statement 5 : A added product P in product_category1
  6. Statement 6 : B review product P

Note that bold is dynamic data such as A, B is some preson’s name, store R is store’name that person add.

In my idea, i have

  • person_table(id, name, age, …)
  • store_table(sid, store_name, province_id, …)
  • product_table(pid, product_name, …)

and how about feed_table??

How I design database to store this data. and How i query this data to view.

thank you

  • 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-16T06:13:01+00:00Added an answer on May 16, 2026 at 6:13 am

    There are two approaches to this kind of problem:

    1. You design your tables in such a way that you have no repetition of information. Basically the feed you’re interested in can be constructed from the existing tables in a performant manner; or

    2. You repeat certain data to make your feed easier to implement.

    Personally I would probably go for (2) and have a new table:

    • Feed: id, person_id, store_id, action_id, province_id, product_category_id

    with the last two fields being optional, based on the action (review, edit, add, etc).

    Purists will argue that repeated data is bad (certainly normal-form seeks to factor it out) but in the real world database schemas do this all the time for performance reasons.

    Think about it this way: what do you spend most of your time doing in your application?

    1. Viewing the feed (reading); or
    2. Doing actions (writing).

    If it’s (1), which I suspect it is, then a feed table makes sense. You typically want to optimize for reads not writes as writes occur far less often.

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

Sidebar

Related Questions

I have created an application that uses settings.settings to store some user specific settings
I know that this question might have been asked like 100 times, but, believe
Background: This is really a general best-practices question, but some background about the specific
Very specific question but we have some good Ada people here so I would
This question might or might not solve my problem - but I hope to
I left this question as generic as possible, but I do have a specific
Skip to the specific question as needed. Some background: The scenario: I have a
I have some script in my default page that redirects users to language specific
I have to sort out my data by some column, such that some specific
i have a query that returns some users related to a specific user (Bob).

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.