I'm working on a project that involves storing a somewhat "large" amount of data. I'm trying to figure out the best way to go about it.
Basically I will need to store a list like this:
1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8...
---------------------------------> Roughly 1000 Digits, Comma Separated
These will be data points that I will reference to display something on a website, user generate values.
My question is, should I do one column with all 1000 numbers and commas, using Perl to split at the commas or use 1000 columns to store the data. (A lot of columns, doesn't sound like a good idea!)
However, every time the data is stored, which will be quite often, it will need to split or rejoin the data back together before inserting.
Is there a better way to go about thinking about this, is there a way to use an array or something like that for my data in mySQL.
Ultimately I want to program something in perl, using DBI and mySQL to store this data. It will be an interactive system for multiple users to be updating the data at once.
With that said, I'm trying to come up with a solution of either perl handling the mess, or giving the job to mySQL to handle the mess with what seems to be like a ridiculous amount of columns.
What do you guys think?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.