Jump to content

[SOLVED] is it safe or wise to make a lot of filed


Recommended Posts

As of MySQL 5,

 

These are the details:

 

Max DB size:                                            Unlimited

Max Table Size:                                        2 GB (Win32 FAT32) to 16 TB (Solaris)

Max Row Size:                                          Max row size

Max Columns per row:                                3398

Max CHAR Size:                                        64 KB (text)

Min Date:                                                64 bits

Max Blob/Clob size:                                  4 GB (longtext, longblob)

Min Date:                                                1000

Max Date:                                                9999

 

I think this should very well answer you, otherwise you can get back for any clarification.

 

I'm sure your database wouldn't be bigger than the Swedish defense deprtment or BBC who use MySQL and SQL extensively.

 

However, it is important to know what application you're handling.....MySQl may not be the best option.

 

(Now the topic marked as not solved)

 

How to do that?

Mysql is the only database i learned, but I'm still new to this.

 

This is my field

 

id | user | pass |    phone    | other_user1 | other_user2 | other_user3 | other_user 4 | ... | user n

1  | john | enter| 0812344  |        0          |        5          |          4          |        14          | ... |    n

 

other_user1,2, 3, ... is  phone number of each users

 

the real field

 

id | user |  pass |    phone    | 0812345 | 0812346 | 0812347 | 0812348 | 0812349

1  | john | enter | 0812344  |      0      |      5        |        4      |      14    |      1

 

The value inside each phone number is how many times user "john" received sms.

So, 0812346 has sent 5 SMS to "john" or 0812348 has sent 14 times

 

When there is a new phone number, it will added to the field, thats why I will have hundreds of field.

 

Do you see any inefficiency the way I build my table? Or maybe there is a better way

 

Thank you very much for replying.

Yes, there is better way.

Create another table like this

 

table user_contacts
phone1, phone2, contacts
0812344,0812345,0
0812344,0812346,5
0812344,0812347,4
0812344,0812348,14
0812344,0812348,1
...

 

Makes sense?

 

Or even better

 

table user_contacts
user1ID, user2ID, contacts
1,2,0
1,3,5
1,4,4
1,5,14
1,6,1
...

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.