Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Databases General > Re: Naming conv...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 17 Topic 3149 of 3295
Post > Topic >>

Re: Naming conventions for special database objects

by --CELKO-- <jcelko212@[EMAIL PROTECTED] > Apr 29, 2008 at 08:41 AM

>> how do you name boolean values? <<

(Warning: my first Masters was in Math).  I don't use them at all.
SQL does not have the concept of Boolean values or flags. The search
conditions and CHECK() constraints are *predicate* logic.  We discover
the answer to a question (yes/no) by looking at *scalar* values in
*predicates*.  That means we don't set a flag for "is_foolicious" in
the data; we use a predicates that tests atomic facts for the
conditions that answer the question (if we can) -- WHERE foo > 12.45
AND lick = 'salty'.  The problem with flags is that they can be set in
a way that does not match the conditions.  Constantly updating them
with a trigger is a waste time and space. Not constantly updating them
destroys your data integrity.

Flags don't expand.  A "simple" yes/no survey question includes "Not
answered" and "Not Applicable" in the real world.  Preferences come in
degrees ("Rate Squid Ice Cream on a scale of 1 to 5 Stars").

This is why we say that a column is a *scalar* value -- it is a
measurement on a scale in a particular unit.  What do Boolean flags
measure?  They don't measure anything.

It is possible to have a scale with two values; my example is + and -
for the Rh blood factor.  That is a very specific physically
verifiable fact on a well-defined scale.  Very often,you can capture
the date of an event instead of a flag --"****p_date" versus
"is_****pped" for example.

Once you understand scales and measurement theory, you will not even
think in terms of flags and assembly language programming.
 




 17 Posts in Topic:
Naming conventions for special database objects
Philipp Post <Post.Phi  2008-04-27 13:13:06 
Re: Naming conventions for special database objects
--CELKO-- <jcelko212@[  2008-04-28 07:28:09 
Re: Naming conventions for special database objects
"Carl Kayser" &  2008-04-28 11:12:23 
Re: Naming conventions for special database objects
--CELKO-- <jcelko212@[  2008-04-28 13:00:10 
Re: Naming conventions for special database objects
Philipp Post <Post.Phi  2008-04-29 05:01:58 
Re: Naming conventions for special database objects
Marco Mariani <marco@[  2008-04-29 14:27:31 
Re: Naming conventions for special database objects
Philipp Post <Post.Phi  2008-04-29 06:09:15 
Re: Naming conventions for special database objects
Marco Mariani <marco@[  2008-04-29 16:11:07 
Re: Naming conventions for special database objects
--CELKO-- <jcelko212@[  2008-04-29 08:22:47 
Re: Naming conventions for special database objects
--CELKO-- <jcelko212@[  2008-04-29 08:41:10 
Re: Naming conventions for special database objects
Marco Mariani <marco@[  2008-04-30 11:13:44 
Re: Naming conventions for special database objects
Philipp Post <Post.Phi  2008-04-29 11:08:57 
Re: Naming conventions for special database objects
Marco Mariani <marco@[  2008-04-30 11:15:33 
Re: Naming conventions for special database objects
Philipp Post <Post.Phi  2008-04-29 11:16:55 
Re: Naming conventions for special database objects
--CELKO-- <jcelko212@[  2008-04-29 14:42:25 
Re: Naming conventions for special database objects
--CELKO-- <jcelko212@[  2008-04-30 08:38:46 
Re: Naming conventions for special database objects
Marco Mariani <marco@[  2008-04-30 18:39:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 9:36:05 CST 2008.