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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:11:59+00:00 2026-06-07T18:11:59+00:00

I am having a brain-cease on a data problem that I am in need

  • 0

I am having a brain-cease on a data problem that I am in need of modeling. I will do my best to outline the tables, and relationships

users (basic user information name/etc)
users.id

hospitals (basic information about hospital name/etc)
hospitals.id

pages
pages.id
user_id (page can be affiliated with a user)
hospital_id (page can be affiliated with a hospital)

Here is where the new data begins, and I am having an issue

groups (name of a group of pages)
groups.id

groups_pages (linking table)
group_id
page_id

Now here is the tricky part .. a group can be ‘owned’ by either a user or hospital, but those pages arent necessarily affiliated with that user/hospital .. In addition, there is another type of entity (company) that can ‘own’ the group

When displaying the group, I will need to know of what type (user / hospital / company) the group is and be able to get the correct affiliated data (name, address, etc)

Im drawing a blank on how to link groups to its respective owner, knowing that its respective owner can be different.

  • 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-07T18:12:01+00:00Added an answer on June 7, 2026 at 6:12 pm
    • Party is a generic term for person or organization.
    • Keep all common fields (phone no, address..) in the Party table.
    • Person and Hospital should have only specific fields for the sub-type.
    • If the company has different set of columns from Hospital simply add it as another subtype.
    • If Hospital and company have same columns, rename the Hospital to more generic Organization
    • PartyType is the discriminator {P,H}

    enter image description here

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

Sidebar

Related Questions

Having a brain freeze over a fairly trivial problem. If I start with an
Having a brain freeze on how best to approach this, I have a ton
Having brain-lock and need a simple/quick answer - I am probably looking at this
I'm having a minor brain-fart that I'm sure someone can answer quickly. I'm using
Greetings, Might be having a brain fart this morning, but I need a way
Sorry but I'm having a major brain fart here (guess that's what a few
I'm having a lot of trouble converting a subquery that would need to return
I'm having a brain cramp... how do I initialize an array of objects properly
ok, I must be having a brain freeze here... I have a ComboBox with
I'm currently having an issue wrapping my brain around the notion of converting my

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.