From: SB
To: Editor
Just a small question about internal data representation, a
matter that doesn't seem to be considered much by most database folk, as they
generally only worry about the input and output they see, rather than what the
computer may be up to in the background.
Suppose I want to store a list of words, such as the colors
of the rainbow for example, as a single column in a table, and use that column
as the primary key. Will the computer access the list as a set of characters,
employing all the various overheads of manipulating strings this would require,
or does the computer access an integer list created internally as the key
field?
I have always thought it best to add a second column of a
numerical integer key to represent each entry, as an efficient means of data
access. However, I have been aware that this introduces all sorts of problems,
such as when inserting and deleting records, as well as the additional storage
space and processing time. Now I am not sure that this is such a brilliant
idea!
From: Fabian Pascal
To: SB
I am in agreement with Chris Date’s reply that I paraphrase:
1.
The logically correct answer is that the model and
implementation should be kept separate at all times;
2.
The pragmatic answer is that with current products you
sometimes are forced to violate that principle, which is always costly.
3.
The new implementation technology that permits to
develop truly RDBMSs would obviate the need for that, but whether the industry
will deploy it is a tossup.
Posted
11/08/02
[ABOUT]
[QUOTES]
[LINKS]