?? berkeleydb概述.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>BerkeleyDB概述-IT者</title>
<meta name="robots" content="all" />
<meta name="author" content="IT者 | www.itzhe.cn" />
<meta name="Copyright" content="Copyright (c) 2002-2005 itzhe.cn" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" media="screen" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" media="screen" />
<meta name="Keywords" content="Be,er,rk,ke,el,le,ey,yD,DB,B概,綜合文章" />
<meta name="description" content="IT者,C#,Java,Delphi,ASP,PHP,ASP.NET,網(wǎng)站建設(shè),.NET,VC,數(shù)據(jù)庫,DB2,SQL2000,Oracle,Mysql,服務(wù)器,C,vs.net2005,網(wǎng)絡(luò),cgi,JSP,CSS,html,xml,rss,域名,Dreamwaver,Photoshop,Fireworks,flash" />
<LINK href="http://img.spos.com.cn/favicon.ico"
type=image/x-icon rel="shortcut icon">
<LINK href="/imagespos/content.css" type=text/css rel=stylesheet>
<script language="JavaScript">
<!--
//改變圖片大小
function resizepic(thispic)
{
if(thispic.width>700) thispic.width=700;
}
//無級縮放圖片大小
function bbimg(o)
{
var zoom=parseInt(o.style.zoom, 10)||100;
zoom+=event.wheelDelta/12;
if (zoom>0) o.style.zoom=zoom+'%';
return false;
}
-->
</script>
</head>
<body>
<DIV id=Header>
<UL>
<LI><A href="/">網(wǎng)站首頁</A></LI>
<LI><A href="/Programme/">編程語言</A></LI>
<LI><A href="/system/">操作系統(tǒng)</A> </LI>
<LI><A href="/databasekf/">數(shù)據(jù)庫 </A></LI>
<LI><A href="/web/">Web開發(fā) </A></LI>
<LI><A href="/Design/">圖形圖象</A> </LI>
<LI><A href="/server/">服務(wù)器</A> </LI>
<LI><A href="/Softproject/">軟件工程</A> </LI>
<LI><A href="/site/">網(wǎng)站建設(shè)</A> </LI>
<LI><A href="/network/">網(wǎng)絡(luò)應(yīng)用</A> </LI>
<LI><A href="http://blog.itzhe.cn/"><SPAN class=cDRed>博客社區(qū)</SPAN></A></LI>
<LI><A href="http://bbs.itzhe.cn/">論壇</A> </LI>
</UL></DIV>
<DIV id=Content>
<DIV class=Left>
<DIV class=Logo><A href="http://www.itzhe.cn/"><IMG src="http://www.itzhe.cn/imagesl/logo.gif"
width=90 height=60 border="0"></A></DIV>
<script language=javascript>
function g(formname) {
var url = "http://www.baidu.com/baidu";
if (formname.s[1].checked) {
formname.ct.value = "2097152";
}
else {
formname.ct.value = "0";
}
formname.action = url;
return true;
}
</script>
<FORM name=f1 onsubmit="return g(this)">
<LI>
<Input class=text style="WIDTH: 130px" value= 百度搜索 name=word>
<Input class=button type=image src="/img6/Search_icon.gif" value=百度搜索>
<Input type=hidden value=bds name=tn>
<Input type=hidden value=3 name=cl>
<Input type=hidden name=ct>
<Input type=hidden value=itzhe.cn name=si>
<Input type=radio name=s> 互聯(lián)網(wǎng)
<Input type=radio CHECKED name=s> 本站itzhe.cn </LI></FORM>
<DIV class=Nav><span class="center cBlue">您現(xiàn)在的位置: <a class='LinkPath' href='http://www.itzhe.cn'>IT者</a> >> <a class='LinkPath' href='/databasekf/Index.html'>數(shù)據(jù)庫</a> >> <a class='LinkPath' href='/databasekf/List/List_52.html'>綜合文章</a> >> 文章正文</span></DIV>
<DIV class=AD>
<DIV class=Con>
<script language='javascript' src='/AD/200705/12.js'></script>
</DIV></DIV>
<DIV class=Content><!-- google_ad_section_start -->
<DIV class=Title><B>BerkeleyDB概述</B></DIV>
<DIV class=Correlative><span class="arcinfo center">作者:solotony 文章來源:www.itzhe.cn 點(diǎn)擊數(shù):<script language='javascript' src='/databasekf/GetHits.asp?ArticleID=44164'></script> 更新時間:2002-11-24</span></DIV>
<DIV class=Info>
<P><SPAN
style="DISPLAY: none"></SPAN></P>
<div id=new>
<div id=zhan>
</div>
<div id=ad>
<script type="text/javascript"><!--
google_ad_client = "pub-6962521868087166";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text_image";
//2007-05-04: itzhe內(nèi)容頁
google_ad_channel = "4491545148";
google_color_border = "FFFBFF";
google_color_bg = "FFFBFF";
google_color_link = "CC0000";
google_color_text = "000000";
google_color_url = "000000";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<P><FONT face=宋體 size=2>Berkeley DB 概述</FONT></P>
<P><FONT face=宋體 size=2>皮東</FONT></P>
<P><FONT face=宋體 size=2> Berkeley DB是由美國Sleepycat Software公司開發(fā)的一套開放源碼的嵌入式<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>的程序庫(database library),<BR>它為應(yīng)用程序提供可伸縮的、高性能的、有事務(wù)保護(hù)功能的數(shù)據(jù)管理服務(wù)。Berkeley DB為數(shù)據(jù)的存取和管理提供了一組<BR>簡潔的函數(shù)調(diào)用API接口。</FONT></P>
<P><FONT face=宋體 size=2> 它是一個經(jīng)典的C-library模式的toolkit,為程序員提供廣泛豐富的函數(shù)集,是為應(yīng)用程序開發(fā)者提供工業(yè)級強(qiáng)度的<BR><a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>服務(wù)而設(shè)計的。其主要特點(diǎn)如下:</FONT></P>
<P><FONT face=宋體 size=2> 嵌入式(Embedded):它直接鏈接到應(yīng)用程序中,與應(yīng)用程序運(yùn)行于同樣的地址空間中,因此,無論是在網(wǎng)絡(luò)上不同<BR>計算機(jī)之間還是在同一臺計算機(jī)的不同進(jìn)程之間,<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>操作并不要求進(jìn)程間通訊。</FONT></P>
<P><FONT face=宋體 size=2> Berkeley DB為多種<a class="channel_keylink" href="http://www.itzhe.cn/Programme/" target="_blank">編程語言</a>提供了API接口,其中包括C、C++、<a class="channel_keylink" href="http://www.itzhe.cn/Programme/List/List_7.html" target="_blank">Java</a>、Perl、Tcl、Python和PHP,所有的<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>操作<BR>都在程序庫內(nèi)部發(fā)生。多個進(jìn)程,或者同一進(jìn)程的多個線程可同時使用<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>,有如各自單獨(dú)使用,底層的服務(wù)如加鎖、<BR>事務(wù)日志、共享緩沖區(qū)管理、內(nèi)存管理等等都由程序庫透明地執(zhí)行。</FONT></P>
<P><FONT face=宋體 size=2> 輕便靈活(Portable):它可以運(yùn)行于幾乎所有的UNIX和<a class="channel_keylink" href="http://www.itzhe.cn/system/List/List_73.html">Linux</a>系統(tǒng)及其變種系統(tǒng)、Windows<a class="channel_keylink" href="http://www.itzhe.cn/system/" target="_blank">操作系統(tǒng)</a>以及多種嵌入式實(shí)<BR>時<a class="channel_keylink" href="http://www.itzhe.cn/system/" target="_blank">操作系統(tǒng)</a>之下。它在32位和64位系統(tǒng)上均可運(yùn)行,已經(jīng)被好多高端的因特網(wǎng)服務(wù)器、臺式機(jī)、掌上電腦、機(jī)頂盒、網(wǎng)絡(luò)<BR>交換機(jī)以及其他一些應(yīng)用領(lǐng)域所采用。一旦Berkeley DB被鏈接到應(yīng)用程序中,終端用戶一般根本感覺不到有一個<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a><BR>系統(tǒng)存在。</FONT></P>
<P><FONT face=宋體 size=2> 可伸縮(Scalable):這一點(diǎn)表現(xiàn)在很多方面。Database library本身是很精簡的(少于300KB的文本空間),但它<BR>能夠管理規(guī)模高達(dá)256TB的<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>。它支持高并發(fā)度,成千上萬個用戶可同時操縱同一個<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>。Berkeley DB能以足夠小<BR>的空間占用量運(yùn)行于有嚴(yán)格約束的嵌入式系統(tǒng),也可以在高端服務(wù)器上耗用若干GB的內(nèi)存和若干TB的磁盤空間。</FONT></P>
<P><FONT face=宋體 size=2> Berkeley DB在嵌入式應(yīng)用中比關(guān)系<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>和面向?qū)ο?lt;a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>要好,有以下兩點(diǎn)原因:<BR> <BR> (1)因為<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>程序庫同應(yīng)用程序在相同的地址空間中運(yùn)行,所以<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>操作不需要進(jìn)程間的通訊。在一臺機(jī)器的<BR>不同進(jìn)程間或在網(wǎng)絡(luò)中不同機(jī)器間進(jìn)行進(jìn)程通訊所花費(fèi)的開銷,要遠(yuǎn)遠(yuǎn)大于函數(shù)調(diào)用的開銷;</FONT></P>
<P><FONT face=宋體 size=2> (2)因為Berkeley DB對所有操作都使用一組API接口,因此不需要對某種查詢語言進(jìn)行解析,也不用生成執(zhí)行計劃,<BR>大大提高了運(yùn)行效.</FONT></P>
<P><BR><FONT face=宋體 size=2>BerkeleyDB系統(tǒng)結(jié)構(gòu) </FONT></P>
<P><BR><FONT face=宋體 size=2> Berkeley DB由五個主要的子系統(tǒng)構(gòu)成.包括: 存取管理子系統(tǒng)、內(nèi)存池管理子系統(tǒng)、事務(wù)子系統(tǒng)、鎖子系統(tǒng)以及日志子系統(tǒng)。<BR>其中存取管理子系統(tǒng)作為Berkeley DB<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>進(jìn)程包內(nèi)部核心組件,而其他子系統(tǒng)都存在于Berkeley DB<a class="channel_keylink" href="http://www.itzhe.cn/databasekf/">數(shù)據(jù)庫</a>進(jìn)程包的外部。 </FONT></P>
<P><FONT face=宋體 size=2> 每個子系統(tǒng)支持不同的應(yīng)用級別。</FONT></P>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -