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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:20:37+00:00 2026-06-04T13:20:37+00:00

To preface this question I should say I know very little about database efficiency

  • 0

To preface this question I should say I know very little about database efficiency which will become glaringly apparent very shortly.

This is a fairly simple question:

I’d like to store attendance to events within a mysql database.
I’ve thought of two possible methods (there are more, I’m sure):

  1. Create an additional attendance row in the events table, containing a comma separated list of user ids
  2. Create an attendance table, containing two columns, event_id and user_id

My instinct says that method 2 would be the most efficient — although multiple rows would have to be returned and traversed, this is likely less costly than searching for a particular user_id within a concatinated string…

Can anyone confirm this?

  • 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-04T13:20:39+00:00Added an answer on June 4, 2026 at 1:20 pm

    The second option is better. Searching in a comma separated string is time consuming.

    However in the 2nd option, make sure the event_id and the user_id are FOREIGN KEYS.

    This will INDEX the columns and you will have better searching results.

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

Sidebar

Related Questions

I will preface this question with the disclaimer that I know there are many
(Preface: this question is about ASP.NET MVC 3.0 which was released in 2011 ,
I should preface this question by saying that I am new to JavaServer Pages.
To preface this, the most I know about text encoding I learned from Joel
Preface: This question is about a project I am working on with a professor
I will preface my question by stating that I know it's a strange request
I will preface this question by saying, I do not think it is solvable.
I should preface this question by saying I think the answer is probably no,
To preface this question, this is my first app and I have a very
I will preface this question with the fact that I am extremely new to

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.