»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 06-30-2003, 01:09 PM   #1 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 11
kydo76 is on a distinguished road
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 07-01-2003, 08:17 PM   #2 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
qball is on a distinguished road
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




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 04:45 AM.