home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

size of fields

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2598
Discussions: 200,999, Posts: 2,380,002, Members: 246,368
Old June 30th, 2003, 04:09 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jun 2003
Posts: 11
size of fields

i was wondering.... if i'm designing a database.... what people's suggestions would be for the size of each field should be for let's say a customer.... like... how many characters should i allow in each field for: first name, last name, address, second line of address, city, email, and any others anyone can think of....
thanks
kydo76 is offline   Reply With Quote
Old July 1st, 2003, 11:17 PM     #2 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
make them as small as the largest value that is reasonably expected. If you think firstname will be 20 chars, at most, use that. But also consider what will happen when first user with 21 char firstname uses system, uh-oh! Easier to make columns bigger in the beginning, than later, further down the road.

varchars make this much easier.

with varchar, table size dependent upon data, not definition of table columns. example

tbl1:
fname varchar (5);

tbl2:
fname varchar (200);

Insert 1 row with fname "qball" into each table. both will be the exact same size.

Insert 1 row with fname "kydo76" into each table. tbl1 will generate error, not good. tbl2, no problem.
qball is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3110)
‘Rogue’ or ‘Rouge’? (9)
Charges against non-tippers dropped.. (22)
Foxconn Blackops x48 MoBo (5)
Nvidia GTX 260 problem (14)
Delete an OS (18)
Laptop with wireless problem. (13)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (9)
windows vista security holes (19)
[F@H SPAM 11/16/09] ! 1/2 months to.. (41)
windows 7 problem (7)
Recent Discussions
add ram to existing (4)
Computer shutting down on its own (6)
EVGA 9800 gtx help with finding a goo.. (13)
"Documents and Settings" fo.. (7)
Delete an OS (18)
Outputing 1080p from my PC to my 720p.. (0)
panasonic dmr ez48veb recorder (0)
Need help getting speakers to work (2)
Nvidia GTX 260 problem (14)
Laptop with wireless problem. (13)
Point and Shoot Camera Suggestions. (9)
Is the PSU I received dead? (16)
FreeAgent drive software not x64 comp.. (1)
Intel 5100 AGN issues fixed yet? (28)
Foxconn Blackops x48 MoBo (5)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (41)
Print spooler problem (17)
Q9650 vs. Q9550 (2)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Size after cutting 700Mb file is 2.5 .. (0)
windows vista security holes (19)


All times are GMT -4. The time now is 02:12 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28