Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: Standards for Field Sizes

    Hello All,

    I'm a newbie so be gentle.....

    I was wondering if there's a "standard" way of sizing common fields in a database and where I could get this info (preferably online).

    What I'm looking for is a list that shows the "standard" size for a TELEPHONE NUMBER field is XX; for a ZIP CODE field is XX; for a CITY field is XX; etc...

    I've been Googling my butt off but haven't really found what I was looking for.

    Any help would be appreciated.

    Thanks.

    -Z-

  2. #2
    Join Date
    Jan 2004
    Location
    Globalized
    Posts
    14
    It depends on whether the data you are storing is not ever going to be other than United States type of information or if your application will have to deal with international data. Phone numbers and Zip/Post codes will differ throughout the world.

    The answer, I think, is: it all depends on the data and what flexibility you need to built into the data storage.

    LF

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Take a good guess, then treat that as a "programmer estimate".

    Programmer estimates can be converted to real world values using a simple algorithm. Every estimate has two parts, a measure (numeric) and a unit (an agreed upon method for taking measurments). So for an estimate of 2 hours, 2 is the measure and hours is the unit. To convert a programmer estimate to a real world measure you double the measure, and move to the next larger unit. In our previous example, the 2 hours then becomes 4 days.

    On a slightly more serious note, guesstimate what you'll need, then use that as a starting point. It will almost always be too low!

    -PatP

  4. #4
    Join Date
    Jul 2004
    Location
    So Cal
    Posts
    14
    I just found this list of more than 300 suggested field types/sizes:
    http://www.prestwood.com/community/d...mon_fields.asp

  5. #5
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Like said in all the other posts we cannot really tell you what should be done. But like here is an example about variance. Your database has a field for phone numbers, usually you make this field type a text field. Why? So you can customize it.
    So say you want to store numbers in the standard US way...You can formt so the input and display is like (@@@) @@@-@@@@
    But say it's for out of state numbers that display can be easily be changed to "1+"(@@@) @@@-@@@@ <- notice the "1+" this will automatically put 1+ infront of the area code
    Then yet again you can only be storing the in office phones which you may just need half, so it changes to @-@@@@
    Or may want international numbers so it may be like "1+" @@-@@-@@@-@@@@

    As you see its all up to you
    Ryan
    My Blog

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Pat Phelan
    Programmer estimates can be converted to real world values using a simple algorithm. Every estimate has two parts, a measure (numeric) and a unit (an agreed upon method for taking measurments). So for an estimate of 2 hours, 2 is the measure and hours is the unit. To convert a programmer estimate to a real world measure you double the measure, and move to the next larger unit. In our previous example, the 2 hours then becomes 4 days.
    that's amazing!!

    amazing, because i actually invented this algorithm myself, many, many years ago, back when i was a manager, and had programmers working for me

    i called it something like "calculating the target date for a fixed piece of work"

    it's nice to see that there's somebody else as twisted as i am...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •