Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!tank!delphi.uchicago.edu!monty From: monty@delphi.uchicago.edu (Monty Mullig) Newsgroups: comp.databases Subject: variable length fields Message-ID: <7437@tank.uchicago.edu> Date: 3 Feb 90 00:37:06 GMT Sender: news@tank.uchicago.edu Reply-To: monty@delphi.uchicago.edu (Monty Mullig) Organization: Univ. of Chicago, BSD Info. Systems Lines: 30 david masterson writes, including segments of my posting: >> to my mind, a variable length field is one in which no fixed maximum >> or minimum is specified by the user. >Fine, but what is the purpose of such a field? Where would you make >use of it >and why? What problems are incurred with being "forced" to specify a maximum? the person defining the database may not know how long a field will be. text, comments, and memo fields might be very difficult to estimate how long the maximum might be. you might define what the system maximum is and make a declaration like: fieldname vchar[SYSMAX]; but if the system maximum increases, you'll need to update all instances of where the SYSMAX constant is set. easier to let the system decide its maximum and just declare something like: fieldname varlen; >> now, the system might place some restrictions on the size of the >> field, such as it must be between 0 and 65,534 bytes long, but the >> user doesn't specify a limit. >How would it differ from a LONG VARCHAR field (DEC RDB terminology, I think) >in which the upper limit isn't specified, but its certainly known (65536)? i don't know that it would differ.