Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Typical Data Items - Length/Size - Best Practices

Hi all,

Sorry to post a question that I'm certain has been talked about somewhere (and hopefully on this message board so that you can just point me to the thread), but my searches have been waning and I digress.

What I'm interested in finding information on has to do with setting up a database, and the best practices for data types (and much more importantly) maximum sizes for basic data items that repeat over and over again throughout projects. Items like first name, last name, address 1, city, ...etc. For instance, using MYSQL (my database of choice for any information I recieve), I've been pondering what data type and size to make the last name field for the database that I am creating.

I obviously want to make it large enough to fit any last name but also as small as possible to conserve space and resources to allow for the possibility of explosive growth in the database. Since you have all almost certainly gone through this with each column of each table to make the db as well setup as possible...do you have any findings, threads, or links that can help me develop me system.

Thank you in advance,
Mike
[1182 byte] By [Argblat] at [2007-11-11 6:48:02]
# 1 Re: Typical Data Items - Length/Size - Best Practices
I can't believe that no one has responded to this!

Reader's Digest Post -

What DataType & Length do you use for the following pieces of information:

First Name
Last Name
Address 1 / 2 (it would be interesting to know how you split this one up as well)
City
Email
Phone

and any more 'standard' data items that I'm not thinking of right now

-Mike
Argblat at 2007-11-11 23:48:04 >
# 2 Re: Typical Data Items - Length/Size - Best Practices
AFAIK there are no standards for size with respect to the types of data you mentioned. In addition, the size for address fields (and number of address fields) and phone numbers will vary if you're supporting the storage of international information.
pclement at 2007-11-11 23:49:03 >