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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:09:26+00:00 2026-05-22T12:09:26+00:00

I am working on a personal / for fun project. I am using cakePHP

  • 0

I am working on a personal / for fun project. I am using cakePHP but this is more of a database design question.

Currently I have a field called group in my USERS table. I have a GROUPS table that list several groups like admin, confirmed, new etc…

I also have a NOTIFICATIONS table that I use to track different types of notifications. I want to add a field in the NOTIFICATIONS table for group, where group is from the GROUPS table.

The problem is if I tag a notification as being part of the “confirmed” group, how do I make sure users in the “admin” group also have access to it. Essentially I want “admins” to have access to everything “confirmed” do, and more.

1) Would it be better to allow users to be part of multiple groups. So a admin is in both the admin and confirmed group?

2) Should I have some extra logic in my code. Like a function that I can pass a “group” to and it will tell me if the user has access to that group?

3) … Other approaches? I am thinking about this wrong?

  • 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-22T12:09:27+00:00Added an answer on May 22, 2026 at 12:09 pm

    It’s not that hard to let users be in multiple groups. You just need a users_groups table that has a user_id column and a group_id column.

    The bigger question is: does it make sense for your application to do this? What are the reasons to do it? What are the reasons not to do it?

    Also, I’m not sure what “confirmed group” means, but that sounds more like a status indicator than a true “group”. But without knowing the detailed requirements, it’s hard to say for sure.


    Update:

    If only admins will have the possibility to be in multiple groups, then it might be better to only allow users to be in one group. Then to indicate if a user is also an admin, you might want to have an is_admin indicator. Of course, the admins will still have to be in some group (unless you allow users to be in zero groups) so you could also put them in the “admin” group. Or is this a situation where an admin is only an admin of *some groups, but not all? In that case, you could have a table of admins_groups which has a user_id of an admin, and a group_id of the group they administer. Multiple records for the same user_id allows the admin user to administer very specific groups.

    So… does it make sense for your users to be in multiple groups? If not now, is it something you may want in the future?

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

Sidebar

Related Questions

I'm working on database designs for a project management system as personal project and
I am working on a personal project as a way of learning more about
I'm working on a personal project (Search engine) and have a bit of a
I am working on this personal project and the sign-in screen of the website
I'm working on a personal project using WPF with Entity Framework and Self Tracking
I'm working on a personal project in Visual Studio 2010 Express edition, using ASP.NET
I have spent the weekend working on a personal project and got stuck here.
I am currently working on a plugin for personal use, but I just can't
I'm working on a personal project for timekeeping on various projects, but I'm not
I currently working on my personal project in Android. I'm quite a newbie in

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.