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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:13:17+00:00 2026-05-16T08:13:17+00:00

after getting my answer here: Database issue, how to store changing data structure i

  • 0

after getting my answer here:
Database issue, how to store changing data structure

i have another question.

lets say i have a workout:

first set: 60 push ups
second set : 55 push ups
third set: 50 push ups
firth set: 45 push ups
and so on..

I think it would be a waste to make an entry for each set,
but making something like this:

workout_id  tabindex     repeat      quantity     quantity_unit  activity
1           1            3           60,55,50,45  pcs            pushups
1           2            1           2            minutes        rope-jumping

seems primitive.

any suggestions?

  • 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-16T08:13:18+00:00Added an answer on May 16, 2026 at 8:13 am

    You could always put quantity in its own table, then you end up with data that looks like this:

    tblWorkouts:
    ----------------------------
    workout id   activity   etc
    ----------------------------
    1            pushups    ...
    
    
    tblQuantities
    ------------------------------
    qID     workout_id    quantity
    ------------------------------
    1       1             60
    2       1             55
    3       1             50
    4       1             45
    

    The quantities are linked the proper record in the workouts table vai the workout_id – thats the relation in relational database 🙂

    This gives you some flexibility in doing things with the data once its in the database. This way its stored as number rather then a comma delimited string you have to parse and add up if you want to get any kind of meaningful data out of it.

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

Sidebar

Related Questions

After getting a helpful answer here , I have run into yet another problem:
After getting the right answer from this question , I am having another problem
I have to generate charts on my Web application, and after getting the answer
After getting no answer to my last question, I reformulated the thing to its
Update: Ok, after getting past the fact that I did not have MSDTC set
I have designed one sign-up form,in this form after getting all necessary values I
EDIT: I figured out the answer to the original YUI3 question I posted here,
Hey guys. This is a follow-on from this question : After getting the right
I am getting the error: error establishing a database connection after moving my wordpress
Edited after getting answers Some excellent answers here. I like Josh's because it is

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.