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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:46:02+00:00 2026-05-31T20:46:02+00:00

In my web application I will have users, each user will have albums, and

  • 0

In my web application I will have users, each user will have albums, and each user will also have various users with permissions tied to an album. I can’t quite figure out if it would be more efficient to model my database with a bunch of tables prefixed by a user ID (i.e. 10384792_albums) or if I should have one table with a bunch of data inside (albums, which contains an id of the user). My previous example was about albums, but relatively the same thing would apply for users of users.

Keep in mind, an album itself will likely have a lot of rows of data itself for instance a name, description, date created, etc. I’m using MySQL and PHP. I suppose this is more of a question where I want to be pointed in the way of good design concepts, something that is scalar without sacrificing the speed of receiving data. Sorry if the question is a bit vague, I really don’t know quite where to start, any help would be appreciated.

EDIT 1: The users of users table is interesting. Think of it this way: for every user on this website, they will have their own unique login form to where their clients can access specific albums. The client will never log into my website using the same form that the users of my website do.

  • 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-31T20:46:04+00:00Added an answer on May 31, 2026 at 8:46 pm

    Something like this?

    User table
    ----------
    ID (primary key)
    Username
    (more columns with more user info)
    
    Album table
    -----------
    ID (primary key)
    AlbumName
    (more columns with more album info)
    OwnerID (foreign key to User.ID)
    
    AlbumPermission table
    ---------------------
    ID (primary key)
    AlbumID (foreign key to Album.ID)
    UserID (foreign key to User.ID)
    (more columns indicating permissions)
    

    With this layout, you have Users and Albums as entities and a table linking them (many-to-many linking table) which contains permissions. (This table is also sort of a meta-entity. By itself it’s essentially meaningless, but in the context of a User or an Album it contains information about the Albums that User can access or the Users which can access that Album.)

    Each Album has a single User as its owner, and zero or more users linked in the AlbumPermission table who have various permissions associated with it.

    Edit:

    Based on your comment regarding tiered users, perhaps something like this…

    Client table
    ------------
    ID (primary key)
    ClientName
    (more columns with more client info)
    
    User table
    ----------
    ID (primary key)
    ClientID (foreign key to Client.ID)
    IsAdmin (boolean)
    Username
    (more columns with more user info)
    
    Album table
    -----------
    ID (primary key)
    AlbumName
    (more columns with more album info)
    OwnerID (foreign key to User.ID)
    
    AlbumPermission table
    ---------------------
    ID (primary key)
    AlbumID (foreign key to Album.ID)
    UserID (foreign key to User.ID)
    (more columns indicating permissions)
    

    The difference here is the addition of a Client table under which User records are grouped. User records now have a foreign key to a Client record so that each user is a member of exactly one client (Client to User is one-to-many), and an IsAdmin field indicating if that User is an administrative-level user for that Client (that is, has the ability to create/modify User records for the Client).

    It’s expected that each Client would have at least one user. It doesn’t necessarily need one in this design, but it would make sense to create an initial User record when creating a Client (the User which is registering the Client).

    You can expand this even further with more dynamic permissions for Client and User records, but this should be straightforward enough to get you going.

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

Sidebar

Related Questions

I have a web application which has several users and each user will have
I'm beginning work on a web application that will have several distinct user types,
I have 3 types of users: Admins Suppliers Employees Each user type will have
In my web application there will be several users. and they have their own
I'm writing a web application that will have plugins. The plugins will be .DLL
I'm working on a web application that will have a custom UI for the
I am starting a web application project that will have an Adobe Flex front-end
I'm writing a web based application that will have its own authorization/authentication mechanism (traditional
If you have a web application that will run inside a network, it makes
I have a web application that will need to access code behind methods as

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.