[bind10-dev] Collation Sequences [was: Blog comment from BDB developer]

Danny Mayer mayer at gis.net
Wed Jul 14 02:01:00 UTC 2010


On 7/13/2010 9:14 AM, Shane Kerr wrote:
> Danny,
> 
> On Tue, 2010-07-13 at 07:46 -0400, Danny Mayer wrote:
>> On 7/12/2010 10:45 PM, zhanglikun wrote:
>>> Danny wrote:
>>>> you have no idea how bad that would be from a DB performance point
>>>> of view. You *really* don't want to do this.
>>>
>>>> I've never heard of something like that in Java and I do quite a  
>>>> lot of Java programming with databases these days. I doubt that 
>>>> this is true.
>>>> Databases either find the records requested or not. There's no in 
>>>> between. You are better off getting the resultset and processing 
>>>> the records for what you need.
>>>
>>> BDB have one native flag ' DB_SET_RANGE ' supporting to get records
>>> in between. see the following discussions.
>>>
>>>> Likun,
>>
>> Yes I read that. The implications of this is that you are going to be
>> limiting bind10 to only use BDB since no other DB supports it. That's
>> okay if you are going to be making that as a final decision, but then
>> that needs to be explicitly stated.
> 
> I'm not sure exactly what you mean. SQL provides us this functionality
> today by using '<' operators. Here is how we find the covering NSEC
> record:
> 
>     SELECT name FROM records 
>     WHERE zone_id=?1 AND rdtype = 'NSEC' AND rname < $2 
>     ORDER BY rname DESC LIMIT 1
> 
> (Pardon the SQLite "LIMIT" extension there, but that is pretty common in
> SQL databases, and can be synthesized if necessary in other SQL
> variants.)

I forgot to mention that collation sequence is important here and that
is usually defined when you set up the database for all schemas. You
need a collating sequence that works for DNSSEC and then you need to
worry about IDN ordering for non-ASCII character sets. That's less
simple and what if you have multiple character sets like US ASCII and
Greek or Traditional Chinese and Simplified Chinese?

Danny



More information about the bind10-dev mailing list