Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!mtxinu!sybase!okra!tim From: tim@okra.sybase.com (Tim Wood) Newsgroups: comp.databases Subject: Re: variable record length Message-ID: <8318@sybase.sybase.com> Date: 2 Feb 90 18:07:31 GMT References: <410@ssc.UUCP> <1990Jan25.000347.7138@oracle.com> <738@dgis.dtic.dla.mil> <742@dgis.dtic.dla.mil> <7388@tank.uchicago.edu> Sender: news@Sybase.COM Reply-To: tim@okra.UUCP (Tim Wood) Distribution: usa Organization: Sybase, Inc. Lines: 39 In article <7388@tank.uchicago.edu> monty@delphi.UUCP (Monty Mullig) writes: >to my mind, a variable length field is one in which no fixed maximum >or minimum is specified by the user. its declaration might be >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. perhaps a better name for this kind of >field would be an "arbitrary length field".... [ was this the intent >of the original poster? {Hi, Jon} ] > >...[ variable-length and arbitrary-length fields ] >both possess a user specified field and thus cannot support arbitrary >lengths longer than the maximum AFTER they have been defined. > Then what's the advantage of arbitrary length, unless it allows a higher system maximum? Actually, it has a subset of the variable-length features. Since both are subject to a system-defined maximum, why shouldn't the database designer be able to bound the size of the values? That cannot be done with arbitrary length (except by defining a higher-level semantic rule). If the db designer doesn't care how big the values get, s/he can just define the column to be var{char,binary} of the system maximum length. Of course, only the amount of data in each value + some epsilon for overhead will be physically stored. I can't see any difference between variable-length and logically stripping off trailing blanks, unless "variable-length" allows sparse values, i.e. "chunks" of bytes strung together with interspersing spaces where these spaces are not physically stored. -TW Sybase, Inc. / 6475 Christie Ave. / Emeryville, CA / 94608 415-596-3500 tim@sybase.com {pacbell,pyramid,sun,{uunet,ucbvax}!mtxinu}!sybase!tim This message is solely my personal opinion. It is not a representation of Sybase, Inc. OK.