<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>评论：代码规范</title>
	<atom:link href="http://www.bdbchina.com/2009/03/%e4%bb%a3%e7%a0%81%e8%a7%84%e8%8c%83/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bdbchina.com/2009/03/%e4%bb%a3%e7%a0%81%e8%a7%84%e8%8c%83/</link>
	<description>Oracle Berkeley DB 中国研发团队的博客</description>
	<lastBuildDate>Mon, 19 Jul 2010 03:43:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>来自：chaohuang</title>
		<link>http://www.bdbchina.com/2009/03/%e4%bb%a3%e7%a0%81%e8%a7%84%e8%8c%83/comment-page-1/#comment-552</link>
		<dc:creator>chaohuang</dc:creator>
		<pubDate>Tue, 08 Dec 2009 04:36:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.bdbchina.com/?p=148#comment-552</guid>
		<description>&lt;a href=&quot;#comment-549&quot; rel=&quot;nofollow&quot;&gt;@camel&lt;/a&gt; 
我觉得你对BDB STL的了解还不够。你可能需要再仔细读一下我们的文档，然后有问题发到Berkeley DB的官方论坛：http://forums.oracle.com/forums/category.jspa?categoryID=246。谢谢你的理解和配合。</description>
		<content:encoded><![CDATA[<p><a href="#comment-549" rel="nofollow">@camel</a><br />
我觉得你对BDB STL的了解还不够。你可能需要再仔细读一下我们的文档，然后有问题发到Berkeley DB的官方论坛：http://forums.oracle.com/forums/category.jspa?categoryID=246。谢谢你的理解和配合。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：camel</title>
		<link>http://www.bdbchina.com/2009/03/%e4%bb%a3%e7%a0%81%e8%a7%84%e8%8c%83/comment-page-1/#comment-549</link>
		<dc:creator>camel</dc:creator>
		<pubDate>Fri, 04 Dec 2009 02:20:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.bdbchina.com/?p=148#comment-549</guid>
		<description>&lt;a href=&quot;#comment-164&quot; rel=&quot;nofollow&quot;&gt;@chaohuang&lt;/a&gt; 
这样做很低效的，千万级以上的数据量都存进内存系统会很难承受，并且join方式查询不支持cursor定位到最后一行，也不支持count方法。
一个应用没有排序几乎是不可能的，bdb的排序支持的不好，所以我们使用bdb也限于key-value方式。

对于排序，您是否能给我们一些其他建议？
luoweiming@126.com</description>
		<content:encoded><![CDATA[<p><a href="#comment-164" rel="nofollow">@chaohuang</a><br />
这样做很低效的，千万级以上的数据量都存进内存系统会很难承受，并且join方式查询不支持cursor定位到最后一行，也不支持count方法。<br />
一个应用没有排序几乎是不可能的，bdb的排序支持的不好，所以我们使用bdb也限于key-value方式。</p>
<p>对于排序，您是否能给我们一些其他建议？<br />
<a href="mailto:luoweiming@126.com">luoweiming@126.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：chaohuang</title>
		<link>http://www.bdbchina.com/2009/03/%e4%bb%a3%e7%a0%81%e8%a7%84%e8%8c%83/comment-page-1/#comment-164</link>
		<dc:creator>chaohuang</dc:creator>
		<pubDate>Thu, 20 Aug 2009 06:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.bdbchina.com/?p=148#comment-164</guid>
		<description>&lt;a href=&quot;#comment-163&quot; rel=&quot;nofollow&quot;&gt;@sas&lt;/a&gt; 
所有的这些都可以通过Btree index来实现(缺省是升序) 或者选择Queue/recno的访问方法(Access method)。你所要做的就是在程序里面加些小小的控制，比如: 把return result保存进array/stack，然后正序/逆序输出就行。注意：在BDB里面的index，如果是建在key上的，叫主键索引；建在data的某个字段上的，叫 secondary database。

另外，你还可以通过cursor来做。比如，你要对某个字段进行倒序输出，首先把cursor定位到last记录，接着调用cursor.hasPrevious() 来判断和输出记录。

总之，BDB的API提供了最大的灵活性给程序员。

在即将发布的BDB 4.8版本中，对于C++的开发者，可以使用BDB提供的集合类了 - 类似于STL。简言之，就是把BDB包装成了Map, Set, Vector给开发者使用。有兴趣的朋友可以关注一下David Zhao的博客（他是该功能的作者）。</description>
		<content:encoded><![CDATA[<p><a href="#comment-163" rel="nofollow">@sas</a><br />
所有的这些都可以通过Btree index来实现(缺省是升序) 或者选择Queue/recno的访问方法(Access method)。你所要做的就是在程序里面加些小小的控制，比如: 把return result保存进array/stack，然后正序/逆序输出就行。注意：在BDB里面的index，如果是建在key上的，叫主键索引；建在data的某个字段上的，叫 secondary database。</p>
<p>另外，你还可以通过cursor来做。比如，你要对某个字段进行倒序输出，首先把cursor定位到last记录，接着调用cursor.hasPrevious() 来判断和输出记录。</p>
<p>总之，BDB的API提供了最大的灵活性给程序员。</p>
<p>在即将发布的BDB 4.8版本中，对于C++的开发者，可以使用BDB提供的集合类了 &#8211; 类似于STL。简言之，就是把BDB包装成了Map, Set, Vector给开发者使用。有兴趣的朋友可以关注一下David Zhao的博客（他是该功能的作者）。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：sas</title>
		<link>http://www.bdbchina.com/2009/03/%e4%bb%a3%e7%a0%81%e8%a7%84%e8%8c%83/comment-page-1/#comment-163</link>
		<dc:creator>sas</dc:creator>
		<pubDate>Thu, 20 Aug 2009 06:13:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.bdbchina.com/?p=148#comment-163</guid>
		<description>BDB不支持sql语法,那能不能通过api设置排序,比如升序降序的,能对不同的关键字用不同的排序规则,比如A用升序,B用降序. 类似sql语句的order by浯法的功能.</description>
		<content:encoded><![CDATA[<p>BDB不支持sql语法,那能不能通过api设置排序,比如升序降序的,能对不同的关键字用不同的排序规则,比如A用升序,B用降序. 类似sql语句的order by浯法的功能.</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：Emily Fu</title>
		<link>http://www.bdbchina.com/2009/03/%e4%bb%a3%e7%a0%81%e8%a7%84%e8%8c%83/comment-page-1/#comment-110</link>
		<dc:creator>Emily Fu</dc:creator>
		<pubDate>Mon, 20 Jul 2009 08:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.bdbchina.com/?p=148#comment-110</guid>
		<description>&lt;a href=&quot;#comment-101&quot; rel=&quot;nofollow&quot;&gt;@shenjianzi&lt;/a&gt; 
你好，欢迎使用BDB产品。
BDB中的事务是针对同一个环境句柄进行操作，即只要在同一个环境句柄中，事务可以对多个同一个环境中的多个数据库进行操作。
关于事务的使用，可以参考http://www.oracle.com/technology/documentation/berkeley-db/db/ref/transapp/atomicity.html和DB_ENC-&gt;txn_begin的API：http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/txn_begin.html。</description>
		<content:encoded><![CDATA[<p><a href="#comment-101" rel="nofollow">@shenjianzi</a><br />
你好，欢迎使用BDB产品。<br />
BDB中的事务是针对同一个环境句柄进行操作，即只要在同一个环境句柄中，事务可以对多个同一个环境中的多个数据库进行操作。<br />
关于事务的使用，可以参考http://www.oracle.com/technology/documentation/berkeley-db/db/ref/transapp/atomicity.html和DB_ENC-&gt;txn_begin的API：http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/txn_begin.html。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：shenjianzi</title>
		<link>http://www.bdbchina.com/2009/03/%e4%bb%a3%e7%a0%81%e8%a7%84%e8%8c%83/comment-page-1/#comment-101</link>
		<dc:creator>shenjianzi</dc:creator>
		<pubDate>Thu, 16 Jul 2009 10:11:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.bdbchina.com/?p=148#comment-101</guid>
		<description>我刚从事利用BDB的开发不久。我设计了一个物理文件，里面包含多个Berkeley database。现在想利用一个transaction向多个database中添加记录。但是，我看到的BDB的文档中transaction示例针对的几乎都是针对一个数据库的操作。我做了一些尝试，但是没有完全成功。请问有没有好的解决方法。</description>
		<content:encoded><![CDATA[<p>我刚从事利用BDB的开发不久。我设计了一个物理文件，里面包含多个Berkeley database。现在想利用一个transaction向多个database中添加记录。但是，我看到的BDB的文档中transaction示例针对的几乎都是针对一个数据库的操作。我做了一些尝试，但是没有完全成功。请问有没有好的解决方法。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
Դ