php - Recommended SQL Types and Lengths -
i'm new sql , i'm working on table stores account information multiplayer game. i'm wondering efficient way store lot of data.
for these 3 columns, think, i've figured out:
username: varchar(20) password: varbinary(16) md5-hashes email: varchar(70)
what think this?
besides that, there lot of more flexible data (savegame data), can't predict. smart save data xml data in field of type text? or there better way save (using php)?
thanks. rob
a couple of advices :
- as possible, use smallest possible type (like tinyint instead of int)
- if have fixen-length string, use char, , not varchar (for md5, instance)
a note more related specific case :
- 70 characters seems bit short e-mail address
- savegame data > use text or blob field.
Comments
Post a Comment