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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:58:33+00:00 2026-05-22T17:58:33+00:00

Imagine an e-commerce website where users can create their own stores. I’m designing internal

  • 0

Imagine an e-commerce website where users can create their own stores.
I’m designing internal messaging system for such website, and I’m currently hesitant as to how to implement it database-wise.

The following scenarios need to be supported:

  • [u => u] user can send message to another user;
  • [u => s] user can send message to a store;
  • [s => u] store can send a message to a user;
  • [s => uu] store can send a message to all its customers.

If I only had a simple Messages table, and a store wanted to broadcast a message to 10,000 users, I would need to insert 10,000 similar records at once.

Another approach is to keep PersonalMessages and BroadcastMessages separate, and introduce BroadcastMessageReceivers “mapping” table. However, this approach complicates working with individual messages, like deleting, showing the inbox and outbox, etc.

Is there any recommended option, considering I’m using Entity Framework and MS SQL 2008?

  • 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-22T17:58:33+00:00Added an answer on May 22, 2026 at 5:58 pm

    If you want each user to be able to manage content of his inbox independently you must handle broadcast message as set of separate messages (or some M:N relations) – each user must have his own record so if he deletes the message from the inbox other users will not be affected. The implementation depends on the way how you want to handle broadcast – do you need to work with broadcast message itself? Then you need separate entity type.

    If you want to use Entity framework make sure that you have stored procedures for broadcasting. Stored procedure will take the message, sender and the store and and create records for all target users. Doing this through EF directly will be terribly slow.

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

Sidebar

Related Questions

Imagine you have a website with several drop-downs that are populated from the back-end
Imagine an HTML form and the jQuery library is loaded. I'd like it such
Imagine you're creating a website that allows people to search for rental cars based
Imagine that users are inserting strings in several computers. On one computer, the pattern
Imagine the following class: class A { public event EventHandler AnyEvent; } You create
Imagine, that u have 10 Imagelinks (Example of such a Link: CLICK What I
imagine a database setup, where x customers can make y orders. normally all customers
Imagine you homebrew a custom gui framework that doesn't use windows handles (compact framework,
Imagine we have a program trying to write to a particular file, but failing.
Imagine you want to animate some object on a WinForm. You setup a timer

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.