Re: Bitwise OR just like SUM or COUNT

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Joe Celko (jcelko212_at_earthlink.net)
Date: 10/26/04


Date: Mon, 25 Oct 2004 21:50:38 -0700


>> The only logical way to answer it is to say that you would store a
copy of sysobjects as is, therefore you would
choose to store a bitmask in the database under some circumstances,
therefore you agree with me. <<

The schema information tables are metadata and are therefore not part of
the database, **by definition**. Think about levels of abstraction,
logical versus physical and all that jazz that you should have gotten in
Database 101 or 102 back in college.

I don't look at or directly manipulate metadata in ANY of the SQL
products I work with. SQL is an application language and that is what I
do when I am wearing my programmer hat. If I am wearing a hat the
required me to look at schema information tables, I go thru the ANSI/ISO
standard views first, then if I have to get to the vendor
implementation, I use the vendor's tool. Finally, if I am consulting at
the hardware implementation level, which is not my thing, then I will
look at bits and bytes if I cannot find a systems language like Oberon
or BLISS.

People with a mindset that still holds onto the assembly code for the
first chip they programmed tend to write quicky code in assembly, C or
"low level language du jour" to jump directly into the DB or the schema
information tables that eventually destroys the database. The next
release of the OS or the database is just enough different that running
the "miracle quicky code" doesn't quite do what it used to do. But it
does something. And it never ports to the next platform.

Almost a decade ago, Dr. George Schussel of Digital Consulting Institute
(DCI) gave a demo at one of the DCI database conferences of a port of a
COBOL & SQL program from an EBCDIC machine (IBM mainframe Cobol and DB2)
to an ASCII machine (MicroFocus COBOL and XDB). The source code was
over 250,000 lines of code and it required 12 changes in the working
storage section.

This was possible because COBOL was defined with characters and SQL was
defined in an abstract model with a standard interface -- and neither
had a concept of bits and bytes.

I would understand why an EE major might have trouble shaking off a
"bits and bytes" model of computing, but why do younger programmers lack
the ability to handle an abstract model? Why do so many of them think
it is impossible to write portable code, -- in short, why have the myths
of 40 years ago become popular again?

To serve as excuses for bad progamming, perhaps? To cover up the lack
of educational foundations among people with only a certificate? Who
said that IT forgets everything it knows in a 4 to 6 year cycle and
makes the same mistakes over and over? That question is not rhetorical
-- I honestly cannot remember the source -- It was a famous guy; Knuth?
Hoare? Wirth? Dijkstra? Anyone know?

--CELKO--
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are. Sample data is also a good idea, along with clear
specifications.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Pass Table as a parameter to a function
    ... Gee, I looked all over my SQL Standards and books, but could not find ... some additional tier in between Reporting Services and the database; ... especially when such a tier is not needed. ... there is nothing wrong with being an application programmer. ...
    (comp.databases.ms-sqlserver)
  • Re: help with tables
    ... SQL0060W The "COBOL" precompiler is in progress. ... result set, however, in embedded SQL I've always used the cursor and FETCHed ... I'd expect it can be done with any database, because .NET people take sets for granted. ... At the moment there is some debate as to whether the addition of LINQ ...
    (comp.lang.cobol)
  • Re: [Info-Ingres] Guardian moves on from Java and Oracle
    ... The application programmer usually doesn't care about the ... Referential integrity and SQL represent an impediment, ... that keep the database from being "unwieldy and slow". ... Essentially re-create the original nested structure? ...
    (comp.databases.ingres)
  • Re: Conversion of data & associated logic from ISAM to RDB
    ... embedded SQL is not necessarily the best solution. ... feed it your ISAM COBOL definition (Source code) and it creates a Relational ... Database in third normal form. ...
    (comp.lang.cobol)
  • Re: Infinite Loops and Explicit Exits
    ... OO lends itself to this type of solution, ... >>are database dependent and not available in COBOL. ... a Cobol program can issue any valid SQL ...
    (comp.lang.cobol)