• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: databases and bool values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: databases and bool values


  • Subject: Re: databases and bool values
  • From: Lachlan Deck <email@hidden>
  • Date: Sun, 20 Aug 2006 16:42:28 +1000

Hi there,

just catching up on some old mail :-)

On 31/07/2006, at 11:56 AM, Ian Joyner wrote:

Char (1) should be more space efficient than integer in the DB (so long as db implementation only uses one character and doesn't pad it out).

I'm not too keen on the loose type definitions (a la C) of 0 = false, any other value = true.

Hmm, well in this case: 0 (or 'f') == false, 1 (or 't') == true, and the only other possibility is null which is 'unknown'.


Whichever way you choose to store the equivalent in the database you still actually want your entity's attribute to be a Boolean and not a String which is database implementation details that we want to be ignorant of.

I have not tried the integer solution in Java client check boxes, but I would hope it would not work!

That's the whole idea (i.e., beeuty) of the NSKeyValueCoding spec. It will happily convert Number/int to [Bb]ooleans if the receiving 'key' requires it.


with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: whywebobjects.org - WWDC followup [and URLs], Lets Start doing it
  • Next by Date: Thoughts on WOFoundation
  • Previous by thread: Re: Missing com.apple.client.directtoweb
  • Next by thread: Thoughts on WOFoundation
  • Index(es):
    • Date
    • Thread