john darnell <john.darn...@walsworth.com> писал(а) в своём письме Wed, 08  
Dec 2010 00:22:54 +0600:

> I have no better reason than that I'm used to it in my dealings with  
> MySQL and C++.
>
> It could save developer time and disk space, however, if it were  
> efficiently implemented.
>
> From the sense of your comment, I get that the answer is no...Oh well.   
> At least I learned something today.
>
> Thanks for the information, Max.
>
> R,
> John
>
>> -----Original Message-----
>> From: sqlite-users-boun...@sqlite.org  
>> [mailto:sqlite-users-boun...@sqlite.org]
>> On Behalf Of Max Vlasov
>> Sent: Tuesday, December 07, 2010 12:15 PM
>> To: General Discussion of SQLite Database
>> Subject: Re: [sqlite] enums
>>
>> On Tue, Dec 7, 2010 at 8:38 PM, john darnell
>> <john.darn...@walsworth.com>wrote:
>>
>> > Is there any way to build an SQLite table that recognizes enums?
>> >
>>
>> Hmm, I always thought that this is better to be implemented by a  
>> separate
>> table and lookup join.  Can you name a reason to do this internally by
>> sqlite?
>>
>> Max Vlasov

Enums are useful for keeping your data correct - i.e. you declate
a field as enum('alpha','beta','gamma') and you can be sure that that
field will be holding only one of those values, and nothing more, never.

Internally these values held as integers (0, 1, 2), one byte per field,
so they won't waste too much space :)

But SQLite has a principle of free-typing (or manifest typing), so I'm
not sure how enums idea conflicts with that principle...

-- 
Regards,
Serge Igitov
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to