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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:17:45+00:00 2026-06-08T06:17:45+00:00

I’m using mysql and I’m working on the schema for a website I’m making.

  • 0

I’m using mysql and I’m working on the schema for a website I’m making. I’m a little stuck because I have users, communities (group of users), activities (plans made by either a user or a community that have one or more users or communities attending), and rsvps (containing the date a user/community rsvped to an activity). I’ve created a table for users, communities, and activities, but I’m stuck on rsvps:

The problem I’m having is that ideally I’d have something like this for the rsvps table:

USER/COM     ID     ACT_ID     DATE     Goin?
U            2342   1          7/1/12   true
U            1342   1          7/2/12   false
U            2842   1          7/1/12   true
C            5342   1          7/1/12   false

ID being a foreign key constraint to either the user or community tables depending on the value of the USER/COM attribute. Now I’m pretty sure it’s not possible to do it like this, so I’m just wondering how you would go about this.

Last note: I will have several other tables that will need to be able to use either users or communities together besides just the rsvp table, so I’d prefer for the idea to be as simple as possible for the rsvp table.

Please let me know if you need more info,
Thanks 🙂

  • 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-08T06:17:47+00:00Added an answer on June 8, 2026 at 6:17 am

    I would make another table that connects users and communities.

    ID    USER_OR_COMMUNITY_ID     IS_USER
    1     32933                    true
    2     2398                     false
    3     23278                    false
    4     923                      false
    

    This could be useful because users and communities might have similar types of information. As an example, users have a name (username), communities too. They might also have a register date, avatar and so on.. So you could have a table having for instance these columns: id, user_or_community_id, is_user, name, date_registred for example. Then all data thats specific to a user would be stored in the user table and same for the communities.

    But I’m not sure, It’s a good question. This might get a bit complicated.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't

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.