Jump to content

3d table


archie

Recommended Posts

Is it possible in Mysql to create a 3 dimensional table; ie one which has x fields, y rows, and z height? This may sound a little odd, but what I want is a table with 51 fields and 50 rows for EACH of my users. Each cell in this table would contain an 11 digit intiger, which would be a reference to another table.

 

At the moment, I am thinking I will have to create a table for each user, so I might end up with thousands of similar (in structure, not in content) tables. Is there a more efficient way of doing this, so I end up with one table which can accomodate all this data?

 

Thanks,

 

Archie

Link to comment
Share on other sites

why not make an index table, giving each user a specific id - then on another table where you want 50 rows and 51 fields per user, make one column user_id which can have 50 rows with the id 1, for user 1. not sure if i\'ve been clear enough. here\'s a bit of a diagram:

 

table 1 - user index

id         username

1          user1

2          user2

------------------------

table 2 - user info

user_id      row      field

1               1          456456464

1               2          897897897

 

etc etc

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.