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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:07:48+00:00 2026-05-19T05:07:48+00:00

Background: I was asking a question on stack overflow regarding creating tables on the

  • 0

Background:
I was asking a question on stack overflow regarding creating tables on the fly where this conversation ensued:

This smells like a terrible idea! In fact, it smells just like this one.
What in the world do you want to use this for? – deceze


@deceze: very true, However, How else would you store the contents of these CSV files.
They must be stored in mysql for indexing.
The only solid fact about them is that they all have a mobile column with a standard format.
The CSV can have an arbitrary amount of columns with an arbitrary amount of rows.
They can (with no exaggeration) range from a single row, 35 column csv to an 80k row single column CSV. I am open to other ideas. – Hailwood


There are many solutions for this, from attribute-value schemas to
JSON storage and NoSQL storage. Open a
new question about it. Whatever you do
though, don’t dynamically create
tables! – deceze

Question:
So my question is,
What would you say is the best way to store this data?
Are you in agreement with deceze about not creating dynamic tables?

  • 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-19T05:07:48+00:00Added an answer on May 19, 2026 at 5:07 am

    A very simple schema for storing arbitrarily long records is this:

    Table `records`
    ===============
    id
    created
    ... other meta data ...
    
    Table `record_attributes`
    =====================
    id
    record_id
    attribute
    value
    

    So a CSV record can be stored like this:

    "Foo","Bar","Baz"     // column names
    42,"Lorem","Jerry"    // first record
    7,"Ipsum","Tom"       // second record
    ...
    
    records(1, '2010-1-17', ...)
    record_attributes(1, 1, 'Foo', 42)
    record_attributes(2, 1, 'Bar', 'Lorem')
    record_attributes(3, 1, 'Baz', 'Jerry')
    
    records(2, '2010-1-17', ...)
    record_attributes(4, 2, 'Foo', 7)
    record_attributes(5, 2, 'Bar', 'Ipsum')
    record_attributes(6, 2, 'Baz', 'Tom')
    

    An alternative is to store the record data as JSON packed blob in a single column. If you don’t need to search for the data, this is the most compact way, albeit not very RDBMS.

    The best fit is probably a NoSQL database, if you have that option.

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

Sidebar

Related Questions

First a little background about why I'm asking this question... I'm working on a
The background for asking this question is that I am solving a linearized equation
Let me pose a bit of background information before asking my question: I recently
i feel stupid asking that question, but it seems like i'm unable to find
I feel noob asking this question but it seems that I cant find the
I am basically asking the same question as Spawn a background process in Ruby
This might be a doozy of a question or I might be asking too
Note : Before asking this question I did an exhaustive search, and found little
This question assumes familiarity with FormStack , a drag-and-drop WYSIWYG online form builder. Background
actually i have found some thread that asking question like mine. but every solution

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.