@astonecipher mentioned stored procedures in a recent post, so i began reading about them. Anyway, i saw an example where the person set a column as username nvarchar(512). I though ?nvarchar? i understand that this is unicode where varchar is ascii. I live in Germany where it is possible that a user types in Turkish, Russian or Polish in addition to English and German. I am wondering if username should be varchar and friendly display name should be nvarchar. But an article mentioned that varchar requires conversion to unicode because the database and the os use unicode natively. Thus, the use of varchar is slower when dealing with a username? should i just make both nvarchar? if so, how large should it be to accomodate a hashed password?
point: i recently changed my db so that a username is a unique key. when i did this, the varchar(255) became an error. mySQL reported that the column exceeded allowable bytes. I reduced the username to varchar(127) and it accepted the change. I need a better understanding of bytes and mysql storage and limitations, yes. However, if i have password varchar(255) then what should i do if i implement nvarchar? double it? nvarchar(512) to accomodate 16-bits?
Thank you.