Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 13th, 2005, 02:44 AM
Ach Ach is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 46 Ach User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 36 m 29 sec
Reputation Power: 5
Exclamation Implementation of boolean types.

Hi all,
I have seen many databases that tables with columns such as IsMale,IsFemale,IsNull,Is...
All these were somekind of boolean type with yes/no or true/false or 1/0 values.In DBMSs that supports boolean or bit data type it can be implemented naturaly but in Oracle that does not have boolean or bit,people usually use number(1) or char(1) for this purpose.
My question: Is this design OK in your opinion? I personally think that this should be design using a relationship with other tables such as HumanSex or...for scalability reasons and so on (Not in fe/male situation! )
Any other ideas are highly appreciated.
-Thanks in advance

Reply With Quote
  #2  
Old July 13th, 2005, 02:59 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,917 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 15 h 52 m 3 sec
Reputation Power: 279
I would use a mix of number(1) and lookup tables (when there is a greater cardinality) to avoid indexing problems and query mess up, imagine the case of a "true-false" table aliased many times in your query (one for each table that has to be filtered for true/false values).

Reply With Quote
  #3  
Old July 13th, 2005, 04:52 AM
Ach Ach is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 46 Ach User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 36 m 29 sec
Reputation Power: 5
Thanks pabloj for your reply,
I have problem with these "lookup tables".I have seen people use that in many bad ways and most of time there is a problem in Design.Say more about your understanding from lookup tables,please.
I agree with you in case of t/f types,But I feel Is... columns are not essentially columns,they are inference of some relations.What is your opinion on this?
-Regards

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Implementation of boolean types.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT