Re: Bitwise OR just like SUM or COUNT
From: Craig Kelly (cnkelly.nospam_at_nospam.net)
Date: 10/26/04
- Next message: Luqman: "Updating two similar tables"
- Previous message: Carl Imthurn: "Re: Preserving a primary key when moving a table to a different database"
- In reply to: Joe Celko: "Re: Bitwise OR just like SUM or COUNT"
- Next in thread: Joe Celko: "Re: Bitwise OR just like SUM or COUNT"
- Reply: Joe Celko: "Re: Bitwise OR just like SUM or COUNT"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 26 Oct 2004 21:15:01 GMT
"Joe Celko" wrote:
>>> Thanks for your comments but using a bitwise is the smart thing to do
> here. <<
>
> I seriously doubt it, but that is only based on 35 years of experience
> :)
>
>>> It is programmers like you that make machines use more memory and
> need faster CPUs. <<
>
> Back in the old days when I was young, we lived in trees and worried
> about chicken*** details like machine usage and storage. Why? Because
> until the 1960's the cost of the hardware was ten times OR MORE the cost
> of the people. We had three shifts and ran machines 24/7.
<snip>
I've known many smart consultants who walked away from projects because they
were doomed from the get-go because of a lack of resources (cash, hardware,
people, etc), outrageous time constraints, bad planning, lack of management
buy in, etc. I've known many smart developers that worked for large
companies with structured IT budgets that were subject to review, especially
when new projects were proposed.
However, not everyone fits these categories. Many developers are faced with
fulfilling requirements with a given amount of hardware and software. The
company is small, the company is short-sighted, the developer is a hobbyist,
etc. At that point, developer time may dwarf the cost of hardware and
software, but with salaried developers it's a variable that can be played
with. The programmer can walk or finish the project, and finishing the
project might very well require goofy optimizations that were necessary when
PDP's roamed the Earth.
Since this began with bitmasks, I'll throw out an example that pops to
mind... Imagine a developer at a non-profit organization working with
bioinformatics. For whatever reason, s/he needs to store genetic sequences
in a relational database. Perhaps the only data backup available is the one
for the database (don't laugh: I've seen that happen before).
When you're talking about that kind of data and a very limited amount of
resources, bitstrings become very attractive. In addition, using an RDBMS
(perhaps the network availability and journaled transactions are attractive)
doesn't mean that you necessarily need a relational model: using our
example, the fictional hardware might make the database nothing more than a
simple storage/retrieval engine since a query of any complexity might very
well cause some kind of space/time anomaly before the poor server melts.
That's not necessarily a bad thing: just because you can use a particular
feature doesn't mean you should. Every user's computer here where I work
has 3D acceleration in the video hardware. The fact that applications are
displayed on the monitor doesn't mean that I should whip out Open GL apps
for accounts payable (but it would be cool).
Craig
- Next message: Luqman: "Updating two similar tables"
- Previous message: Carl Imthurn: "Re: Preserving a primary key when moving a table to a different database"
- In reply to: Joe Celko: "Re: Bitwise OR just like SUM or COUNT"
- Next in thread: Joe Celko: "Re: Bitwise OR just like SUM or COUNT"
- Reply: Joe Celko: "Re: Bitwise OR just like SUM or COUNT"
- Messages sorted by: [ date ] [ thread ]