On 18 Aug 2003 06:11:06 -0700,
lb*****@hotmail.com (Albretch) wrote or
quoted :
f mysql can internally handle binary
data such as BLOBs and MD5 is supposed to be a one way method anyway
(and also the fact that we are talking here about security data) why
is it translated to text and stored as such?
The catch is SQL was originally envisioned as strings of ASCII
sentences going back and forth. This allowed platform independence in
days when computer architectures could not decide on 1 vs 2
complement, how big a BYTE was etc.
Now we are gradually trying to retrofit binary into SQL.
The ASCII limitation adds complication and overhead packing and
unpacking.
At some point we need to invent a BSQL that is designed primarily
around binary. Instead of ASCII sentences it would use arrays of
tokens for queries. Result set rows would appear as objects.
Setter methods on the objects would track changes to the fields
automatically. Thus an update could be handled with a simple .update
command, that would send back just the fields that had changed.
Alternatively, it might work by keeping and old and new version of the
row object.
For these simple row objects, there could be a more streamlined
serialisation protocol that did not need to specify the types of
fields, just the raw data. The receiver knows precisely what is
coming.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See
http://mindprod.com/jgloss/jgloss.html for The Java Glossary.