January 2008
Intermediate to advanced
384 pages
8h 1m
English
Programmers coming from procedural languages are surprised to learn the SQL does not have a BOOLEAN data type. Their reaction is to use a proprietary BIT or BINARY data type to store flags, if their product has them, or to use a CHAR(1) with a constraint to allow only two values.
Flags like this should be replaced with the data that set them to their current state. For example, do not have an “is_delivered” flag when you could have the delivery date.
In the old punch card days, we would compute line totals in commercial application by multiplying the item quantity and unit price and punching the results in the right side of the card with special equipment. There was no place to keep the data except the cards. ...
Read now
Unlock full access