Re: Representing data on disk in an MV database - was Re: foundations of relational theory? - some references for the truly starving

From: Anthony W. Youngman <thewolery_at_nospam.demon.co.uk>
Date: Sun, 26 Oct 2003 21:00:06 +0000
Message-ID: <bgn1xFBWXDn$Ews0_at_thewolery.demon.co.uk>


In article <bUTlb.2937$wc3.186_at_newsread3.news.pas.earthlink.net>, Jonathan Leffler <jleffler_at_earthlink.net> writes
>Does that mean that all field values are stored as printable character strings?
>I've seen similar comments before, and always been puzzled by them. It seems to
>be the only way to understand the use of a fixed byte code as the value
>separator (sorry - I've forgotten the correct MV terminology).

It does. It makes life easier. What if you want to store the number 33,000 and the DBA declared the field as a signed int*16? Do you REALLY want the user to have their data entry screen crash on them? Don't forget, the alternatives are either a corrupted database, or the incorrect rejection of valid data?
>
>If I'm correct, and if an MV database is storing integer values in the range
>0..999 (or maybe 0..9999), then the space used is no worse than in a system
>which uses a binary data representation, but as soon as you're dealing with
>numbers in the millions, instead of using a fixed length (4 bytes for a 32-bit
>integer), this system seems to be using a lot more space. (Yes, I quietly
>ignored negative numbers - I'm curious about how they're represented on disk
>too.)

Yep, we may waste a BIT of space storing numbers, but it has two VERY big advantages.

At my work, for example, we deal a lot in Turkish Lire. I don't know how many significant figures we need, but we don't need to worry (most floating point numbers have an upper limit of about 14).

And what do you do about the guy who named his son after the ENTIRE Arsenal football team? Okay, our data input and output routines might moan about the field length, but the database itself couldn't give a sh*t! It'll just accept whatever you throw at it!

Cheers,
Wol

-- 
Anthony W. Youngman - wol at thewolery dot demon dot co dot uk
Witches are curious by definition and inquisitive by nature. She moved in. "Let 
me through. I'm a nosey person.", she said, employing both elbows.
Maskerade : (c) 1995 Terry Pratchett
Received on Sun Oct 26 2003 - 22:00:06 CET

Original text of this message