Hi,
I need a recommendation about how to structure my data into the database.
With time, each of my users is going to generate several long-arrays of data. I could put all this arrays simply into a table. But that means a new table for every user. That doesn't looks like a clever idea.

It could be possible to put this whole table with arrays into the some user's field?
I'm thinking it wrong?

Any help is appreciated.

Comments

cog.rusty’s picture

The only sure thing is that you shouldn't create a new table for each new user.

Begin with everything in one table. Create a field for the user ID (uid), maybe one for the array ID if you need to retrieve specific arrays, and one for each array element.

If you see a few information repeated too many times, or if some array elements are also arrays, then you can start thinking about splitting the schema into more tables. It depends on the details.

Google database design and read a few articles. For now, skip any articles which mention "relational calculus" or "relational algebra" or how "SQL violates the relational model". Do read articles which mention the "third normal form".