Re: To 'bit' or not to 'bit'...

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: --CELKO-- (jcelko212_at_earthlink.net)
Date: 12/29/04


Date: 29 Dec 2004 08:50:51 -0800


>> Replace the word bit above with any other SQL datatype and frame the
question again. <<

The ANSI X3J programming languages have rules for converting internal
SQL data types to their native data types as part of the Standards.
NULLs are handled by indicators. However, there is no Standard for BIT
in higher level languages that do not support them (remember COBOL? 78%
of the world's programs are written in it and it works at the character
level).

But more than that, there is no standard or reasonable way I can see to
have a BYTE whose third BIT is a NULL. Your choice is to get all of
the X3J languages to agree that BIT and BYTE are both atomic numeric
types with "funny math" operators.

I find the idea that bytes are not made from bits strange. I also find
that doing byte operations with a NULL bit in the BYTE to be really
strange -- What is an exclusive OR on NULLs? What is a two-complement
addition? A ones-complement addition? How did you define shift, carry
and other basic bit level operations?

I will not even get into the old Russian 3-stage computers, early
base-ten hardware and the Burroughs BCD Cobol machines, in which the
hardware had no bits at all.

Again, bits and bytes are too low level to be used in SQL. You are
mixing physical implementation with the logical model.



Relevant Pages

  • Re: too much OOP ?
    ... "level of abstraction", but most IT professionals would agree that SQL ... SQL is one of the few successful 4GL languages. ... So the programming languages design turned to a side direction, ...
    (comp.object)
  • Re: Boolean to Bit?
    ... >1) The double quotes in Standard SQL are used to mark an identifier; ... >2) There are no BOOLEAN or BIT data types in SQL. ... There is no confusion in SQL Server. ... which are expected with any pair of languages. ...
    (microsoft.public.sqlserver.programming)
  • Re: No knowledge of the database?
    ... >>Is your recommendation that all applications should be written in SQL ... C++ is a multiparadigm languages. ... higher level than most imperative programming languages. ... those procedural extensions are way lower level than most ...
    (comp.object)
  • Re: SQL
    ... custom biz app setting. ... Put a program code in a relational table and write compiler in SQL ... SQL is one of an infinite possible relational languages. ... how would making each pixel an ADT or Object improve the picture ...
    (comp.object)
  • Re: Is there a mainframe skills shortage?
    ... That's because the author of the article is comparing it to standard SQL. ... and material around Lamdas and functional programming. ... obvious which languages were the ones to learn. ... stick to writing system software and leave applications to the COBOL ...
    (comp.lang.cobol)