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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:07:28+00:00 2026-06-15T13:07:28+00:00

I am trying to store some data in database but could not figure out

  • 0

I am trying to store some data in database but could not figure out how the database should be designed for maximum productivity…

User has an option to choose number of entries in a form. And then these entries are required to be saved in the database. It is however not known how many entries the user wants e.g they can be 1 or 100.

How is it better to save such data?

What i have in mind is to store the number of entries in database with the userID and put the inputs into an array, serialize it and store it in the database.

  • 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-15T13:07:30+00:00Added an answer on June 15, 2026 at 1:07 pm

    I would probably do the following:

    +---------------+
    | Table: users  |
    +----+----------+
    | id | username |
    +----+----------+
    |  1 | tanzeel  |
    |  2 | john     |
    +----+----------+
    
    +-----------------------------------------------+
    | Table: entries                                |
    +----+---------+------------+-------------------+
    | id | user_id | entry_name | single_entry_data |
    +----+---------+------------+-------------------+
    |  1 |       1 | prop1      | ################  |
    |  2 |       1 | prop2      | ################  |
    |  3 |       1 | prop3      | ################  |
    |  4 |       2 | prop1      | ################  |
    |  5 |       2 | prop2      | ################  |
    |  6 |       1 | prop4      | ################  |
    +----+---------+------------+-------------------+
    

    The entries table stores n entries for each user associated with the user_id which is a FK (foreign key) reference to the PK (primary key) column id of table users. When you want to retrieve the data you can fire a select query as follows to get the entries for a particular user.

    SELECT * FROM entries A
    INNER JOIN users B
    ON A.user_id = B.id
    AND B.id = 1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get some data out from a database stored as text
I'm trying to store some binary data obtained from read() in my buffer using
I'm trying to save some specific JSon data and store them in a simple
I am trying to create a database to store some questions and answers for
I am trying to get some data stored in a database that i can
So, I am trying to store some data on the SQLite db in Android,
I am trying to best figure out a way to store this particular case
So, I'm trying to figure out the best way to combine many data types
I am trying to store some parsed feed contents values in Sqlite database table
I am trying to get some data relevant to a stored procedure (or function)

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.