Berkeley DB 和关系型数据库的比较(1)

Berkeley DB Windows应用     最近有涉及到个人数据本地安全性保存的问题,Google大量数据之后发现Berkeley DB,一个小巧的嵌入式数据库。但是基本的文章都是这对Linux的,通过自己的使用,总结在Windows上的应用。    首先到http://www.oracle.com网站下载DB的源码,可以下带驱动的,可不带驱动的(含NC字样)。你可以根据你的应用生成各种类型的dll,比如生成Windows的,就 阅读详情

A Comparison of Oracle Berkeley DB and

Relational Database Management Systems

Berkeley DB 和关系型数据库的对比

 

INTRODUCTION

介绍

 

Oracle is well known for its industry-leading database engine, Oracle Database.

Oracle Database is an extremely reliable, highly scalable, client-server, relational

database management system (RDBMS). It serves as the information repository for

a wide range of applications in a large variety of industries around the world.

Oracle 以其领先的工业级数据库引擎而著称,Oracle 数据库是一种非常可靠的,高速发展的关系数据库管理系统,在全世界很多工业化应用中,Oracle 为广大应用程序提供了信息仓储服务。

 

In addition to Oracle Database, the company offers a number of other database

products for systems and applications that have special performance, resource or

run-time requirements. Oracle’s TimesTen database is a high-performance inmemory

engine that provides relational database services with outstanding

responsiveness and throughput. The Oracle Lite database serves the mobile and

device markets, providing easy-to-use storage with synchronization services that

allow occasionally-connected devices to share information with a centralized

Oracle Database server. Oracle Berkeley DB is the company’s only non-relational

storage engine, and is aimed at applications and devices that need fast local storage

without using SQL for data access.

除了Oracle数据库之外,公司也提供了大量的数据库产品,针对存在特殊的平台, 资源,时间性能的需求。Oracle’s  TimesTen 数据库拥有杰出的响应速度和系统吞吐量。Oracle Lite 数据库服务于移动和驱动市场, 提供了简单易用的存储,并且支持允许发生偶然连接用于共享 集中Oracle数据库服务器的同步数据服务。Oracle Berkeley DB是公司仅有的非关系数存储引擎, 旨在解决本地数据在没有使用SQL进行数据访问的情况下满足快速的存储需求。

 

 

Because Oracle Berkeley DB is non-relational, it is very different from Oracle’s

other database products. Users familiar with Oracle Database are often surprised

by Berkeley DB, and wonder how and where it can best be used. This paper

explores both the similarities and the differences between RDBMS products and

Berkeley DB, in order to help customers decide when Berkeley DB is, and is not, a

good choice for the system that they are building.

由于 Oracle Berkeley DB是非关系型的, 它很土同于Oracle公司的其他数据库产品,熟悉Oracle数据的用户经常对Berkeley DB感到惊奇,疑惑如何,怎样使用它,这篇文章探索了RDBMS产品与Berkeley DB之间的相似和不同之处,从而帮助客户决定何时能够对Berkeley DB作出选择,何时不能选择,在我们创建的系统中。

 

WHAT IS BERKELEY DB?

Berkeley DB 是什么?

 

Berkeley DB is a high performance, scalable and reliable non-relational storage

system. An outgrowth of research performed initially at the University of

California at Berkeley, and later continued at Harvard University, Berkeley DB was

designed from the very beginning to be an embeddable database engine, so no

separate server is required, and no runtime human administration is needed.

Berkeley DB 是一种具有高效,快速升级,高可靠性等众多优点的非关系型存储系统。 最开始的研究成功来之 加州大学伯克利分校。后来在哈佛大学得到了发展,一开始 Berkeley DB就被设计成一种嵌入式的数据库引擎, 因此不需要单独的服务器,在线管理员也不需要。

 

Philosophically, Berkeley DB is a tool for software developers, not for IT

professionals or DBAs. It is intended to provide fast, reliable data storage for

applications. The only way to use Berkeley DB is to write code. There is no

standalone server and no SQL query tool for working with Berkeley DB databases.

Developers often find it easiest to think of Berkeley DB not as a database system,

but rather as a library with a good B-tree, hash table and persistent queue for

storing records in an application. That is a reasonable simplification. Unlike simple

B-trees or hash tables, though, Berkeley DB offers enterprise-grade, concurrent,

transactional storage services, so that multiple threads or processes can operate on

the same collection of B-trees and hash tables at the same time without risk of data

corruption or loss.

从哲学上说,Berkeley DB是针对软件开发人员的一种工具,而不是为IT专业人员或数据库管理员,它更倾向于为应用程序提供快速,可靠的数据存储。 使用Berkeley DB的唯一方法就是编写代码,没有长久的服务器和SQL 查询工具当使用Berkeley DB 存出数据记录的时候。 开发者经常发现把Berkeley DB 想象成一种具有优秀B-Tree,hash table 和persistent queue的库 比 当成一个数据库系统更加简单、那是很合理的简化,不像简单的B-Trees或hash tables, 然而Berkeley DB提供了企业级,支持并发,事务型存储服务,因此在B-Trees 和hash tables上的多线程或多个进程同时操作不会引起数据丢失或冲突。

 

The Oracle Berkeley DB product line consists of three different embeddable

offerings.

Oracle Berleley DB产品线包含了三个可嵌入的组件。

 

In the lower left corner, the product named Berkeley DB is an embeddable library

written in the C programming language. It supports different on-disk storage

structures, provides full transactional storage services and offers replication for

fault tolerance and high availability. The product supports C, C++ and Java

language access, as well as a wide variety of popular scripting languages.

在下脚左边,名为 Berkeley DB 的产品是一个可嵌入的库,该库使用C语言完成,它支持不同的硬盘存储结构,提供了完全的事务存储服务和对容错的复制和可用性, 这个产品支持C,C++和JAVA 访问,也支持许多流行脚本语言。

 

Developers building XML-based applications can choose the Berkeley DB XML

product, layered on top of the C engine. Berkeley DB XML understands XML

schemas, is able to parse and index XML documents, and uses XPATH and

XQuery for data retrieval. It supports C++, Java and a variety of popular scripting

languages.

开发者创建基于XML的应用程序能选择Berkeley DB XML 这个产品,处于C 引擎的顶端,Berkeley DB XML支持XML模式,能够解析和索引XML文档,也可以使用XPATH和XQUERY进行数据查询, 它支持C++ ,Java 和大量流行脚本语言。

 

Java developers that want the same embeddable storage services as C programmers

get, but who need to deploy a 100% pure Java system, can choose Berkeley DB

Java Edition. This embeddable engine runs as a single JAR in a Java Virtual

Machine. It provides the same transactional storage and retrieval services as the C

product, but is implemented entirely in Java.

那些想要和C程序员具有相同的嵌入式存储服务的Java开发人员,当他们想要开发一个100%的纯Java系统时, 他们可以选择Berkeley DB Java Edition, 他和个嵌入式引擎以一个JAR文件在Java虚拟机上运行,它提供相同的事务存储和检索服务 就像C产品一样, 但完全在Java环境下执行。

 

CHOOSING THE RIGHT TOOL FOR THE JOB

为你的工作选择正确工具

Sometimes, it is easy to decide how to store data in an application.

有时候,在应用程序中决定怎样存储数据是很容易的。

 

For example, large accounting or customer support systems often come already

integrated with a relational database product. These systems use the relational

engine to store and retrieve the data they manage, and allow administrators and

others to query and manipulate that data separately, using SQL and SQL-based

reporting tools.

例如,大账户或客户支持系统经常和关系型数据库产品相集成,那些系统使用关系型数据库引擎存储或检索他们所管理的数据, 并且允许管理员和其他人单独查询和操作数据,使用SQL,或基于SQL的报告工具。

 

In other cases, a simple file system is all that is needed. Word processing

applications, spreadsheets and software development tools like editors and

compilers read from, and write to, the file system. Users of these applications work

with files by remembering what folders they appear in, and what they are named.

No more elaborate query services are required.

然而,有时应用程序不需要所有的关系型数据库引擎,但一些低级的文件系统又达不到要求, 在这种情况下,RDBMS是冗余的,它提供了太多功能,并且太大并且复杂,对比起来,文件系统又显得力不从心,它的功能太少,并缺乏数据库系统所拥有的完整,并发和性能优势。、

 

Berkeley DB is aimed squarely at that middle ground.

Berkeley DB 正好处于中间状态。

 

Important Services

重要的服务

 

When choosing a repository for a new application or service, an architect must

think about the data storage and retrieval services that the application requires.

当为一个应用程序或服务选择知识库的时候,架构师必须考虑所需要的数据存储和检索服务。

 

Storage

存储

 

File systems offer fairly rudimentary storage services, as a rule. They allow

applications to read or write any kind of data, but make no guarantees about how

simultaneous updates to the same region of a single file are handled. Applications

that need to make several interdependent changes to different files – for example,

adding a password file entry for a new user, creating a home directory and

allocating a mailbox – get no help from the file system, and must handle that

interdependency themselves. If the system loses power or suffers a software crash

in the middle of a change to a file, most file systems make no promises about what

data will survive after restarting.

文件系统提供很基本的存储服务,他们允许应用程序读写任何数据,但当该数据被访问的时候,不能保证同步更新,需要对几个不同文件创建互相依赖的变化,例如为一个用户添加密码文件, 创建主目录和分配一个邮箱- 文件系统将不能奏效,不需访问互相依赖的文件自身,如果系统对现存的操作失去控制或软件出现异常,大部分文件系统不能保证重启之后那些数据仍然存在。

 

Most relational databases, by contrast, offer much richer storage services.

Competing updates to the same information in a table are handled according to

simple rules that guarantee the correct outcome. If an application needs to make

several related changes to different tables, it simply starts a transaction, makes the

changes, and commits the transaction. The database system guarantees that none

of the changes will be permanent until the transaction commits, but once it

commits, the changes are all guaranteed to be present, even after a system crash

and restart. Most relational systems do impose strict rules about the kinds of

information they will store – applications must turn their data into records in

tables, and must translate from between the application’s internal representation,

and the database representation, at runtime.

相对照,大部分关系型数据库提供了更丰富的存储服务,完成对一张表中的相同信息进行更新,通过简单的规则就可以保证正确的结果。如果应用程序需要更新多个不同的表,仅仅需要创建一个事务,更新数据库,提交事务,数据库系统就可以保证直到事务结束后才接收其他数据更新,然而,一旦更新提交了,新结果保证可以被呈现,甚至系统出现瘫痪掉或重启后,大部分关系型系统对它们存储的信息强加一些严格的规则-应用程序必须把数据转换到表中, 在运行时,应用程序必须在程序内部展现和数据库展现中做出翻译/转换。

 

Queries

查询

 

File systems organize information by filename. Files are stored in folders. In order

to use a file, the application must know the name of the file, and of the (likely

nested) folder in which it is stored. Of course applications exist that can search a

file system for particular file contents, owners and so on, the only built-in query

facility in most file systems is name-based lookup.

文件系统以文件名组织信息,文件存储在文件夹中,为了使用文件,应用程序必须知道文件的名称和文件路径,当然应用程序可以用文件名方式来查询文件内容。

 

Relational systems allow applications and users to search for information by typing

queries in SQL. These queries can examine the contents of individual records in

individual tables, and can combine information from different tables easily. Table

names are important, but otherwise, a query in a relational system describes the data

it wants instead of naming it.

关系型数据库系统允许应用程序和用户使用SQL进行数据查询,查询能够在每个表中的每个字段上进行,也可以在不同的表中合并数据记录,表名是不同的,除此之外,在关系型数据库中的查询描述他想要的数据而不是为它命名。

 

Relational systems, by virtue of SQL, provide an important kind of flexibility: They

allow arbitrary queries in the future. In a file system, a file name is fixed and is the

only way to look up a file. In a relational system, any combination of columns in

any combination of tables can be used to search for, and to combine, data. Rather

than prescribing search criteria in advance, relational systems support ad hoc

queries.

关系型系统,在SQL的帮助下,提供了一种重要的特性:他们支持任意可预见的查询,在文件系统中,文件名是固定的,文件名也是查询一个文件的仅有方式,在关系型系统中,不管是不是来自同一个表,任意列都可以用来查询,也可以组合成数据,比起预先指定查询标准,关系型系统支持多表联合查询(ad boc)

 

 

Berkeley DB

 

Berkeley DB offers many of the storage services – transactions, concurrency, and

recovery – of relational database engines. It is closer to a file system in that it stores

any kind of data in any format, but provides no easy tools for ad hoc queries.

Some applications need transactions and recovery, but not the ability to support

arbitrary end-user searches against the data they store. For those applications,

Berkeley DB is often a better choice than either the file system or a relational

database engine. Berkeley DB combines the simplicity of file system-style data

storage and retrieval with the enterprise-grade scalability, reliability and

transactional guarantees of a high-end relational system like Oracle Database.

Berkeley DB 提供许多存储服务- 事务,并发,恢复,这些关系型数据库引擎,更贴切的说它和文件系统很相近,因为可以任一种格式存储数据,然而没有提供很简单的工具在ad boc查询的时候。

 

开发人员必须编写代码在Berkeley DB中进行那个数据查询。

 

 

一些应用程序需要事务和数据恢复,但不支持任意的最终用户在数据库再次查询数据, 对于这些应用来说,Berkeley DB是一种不错的选择。Berkeley DB 组合了文件系统的简单特性和像Oracle等高端关系库的复杂,高级特性。

 

KEY DIFFERENCES

主要区别

 

Berkeley DB is different from relational systems in several important ways.

Berkeley DB不同于关系型系统在以下几点。

 

Berkeley DB Is a Library

Berkeley DB是一个库

 

Most enterprise-grade relational database engines are heavyweight servers. They are

often installed on a special purpose machine somewhere in the data center.

Applications that want to store data must connect, usually over a network, to the

server, and must read and write data remotely.

大多数企业级关系型数据库都是重量级的服务器。他们被安装在数据中心的特殊目标机器上, 想去存储数据的应用程序必须连接,通过网络访问服务器,并且只能远程读写数据。

 

Berkeley DB, by contrast, is a library. Each of the three Berkeley DB products

links into the same address space as the application that uses it. If multiple

applications want to share a single database, they can do so. Each links the

Berkeley DB code into its address space, and Berkeley DB uses shared memory

and operating system primitives for mutual exclusion to be sure that each thread of

control cooperates with the others.

对比起来,Berkeley DB 只是一个库,三个Berkeley DB产品中的每个都连接到应用程序使用的地址空间,如果多个应用程序想要分享单独的数据库,他们可以这样做,共享内存和操作系统而不会产生冲突。

 

 

 
Berkeley DB 概述 Berkeley DB 概述皮东    Berkeley DB是由美国Sleepycat Software公司开发的一套开放源码的嵌入式数据库的程序库(database library),它为应用程序提供可伸缩的、高性能的、有事务保护功能的数据管理服务。Berkeley DB为数据的存取和管理提供了一组简洁的函数调用API接口。    它是一个经典的C-library模式的toolki 阅读详情

相关推荐

OpenLDAP-Berkeley DB 設定

以下前言為引述[Berkeley DB - 維基百科]Berkeley DB (DB)是一個高性能的,嵌入資料庫編程庫,和C語言, C++, Java, Perl, Python, Tcl以及其他很多語言都有綁定。Berkeley DB可以保存任意類型的鍵/值對,而且可以為一個鍵保存多個數據。Berkeley DB可以支持數千的併發執行緒同時操作資料庫,支持最大256TB的數據,廣泛用於各種作業系

小白的一生 4728

dbXML 程序员手册

1. 引言(Introduction) dbXML是一种本源数据库(Native XML Database,NXD)。NXD用内在化的格式存储XML以获得更快的整体处理速度。dbXML是基于J2SE 1.4开发的,也应该在J2SE 1.4上运行。 2. 在本文档中使用的约定(Conventions Used in this Docum...

weixin_34275734的博客 521

Berkeley db 数据库

简介 它是由sleepcat开发,后被oracle收购,并提升了它在数据库行业中的知名度。 Berkeley DB (DB)是一个高性能的,嵌入数据库编程库,和C语言,C++,Java,Perl,Python,PHP,Tcl以及其他很多语言都有绑定。Berkeley DB可以保存任意类型的键/值对,而且可以为一个键保存多个数据。Berkeley DB可以支持数千的并发线程同时操作数据库,支

zhaojinjia的专栏 7926

【转】Berkeley DB介绍

Berkeley DB(BDB)是一个高性能的,嵌入数据库编程库,和C语言,C++,Java,Perl,Python,Tcl以及其他很多语言都有应用程序编程界面。Berkeley DB可以保存任意类型的键/值对,而且可以为一个键保存多个数据。Berkeley DB可以支持数千的并发线程同时操作数据库,支持最大256TB的数据,广泛用于各种操作系统包括大多数Unix类操作系统和Windows操作系统以及实时操作系统。

我的博客 1259

Berkeley DB概况

说实话,在我进入Oracle之前一个月,也是拿到Oracle的Offer 5个月之后,我才得到我未来经理的电话通知(我不是怪他通知的晚,事实上我非常感谢他给我机会进入这个产品组---这纯属机缘巧合,让我来到一个崭新的世界),说我在Berkeley DB产品组,这之前我从来没听说过它,我的第一印象,Berkeley的DB不是postgresl吗?仔细一查,才知道它是Oracle的嵌入式数据库,而嵌入

赵伟的计算机软件技术专栏 1943

Berkeley DB示例程序详解 (1)

 /** 这个例子程序是Berkeley DB的示例程序之一(DB/example_cxx/AccessMethod.cpp),* 它演示了如何使用Berkeley DB的基本功能,包括打开一个数据库,存入若干个* key/data pair,然后遍历数据库中的数据,最后关闭数据库。** 原始代码中有一些英文注释,但是对于初学者还是不够详细,我没有删除原来* 的注释,而且添

赵伟的计算机软件技术专栏 3365

Berkeley DB基础教程

一、Berkeley DB的介绍 (1)Berkeley DB是一个嵌入式数据库,它适合于管理海量的、简单的数据。如Google使用其来保存账户信息。Heritrix用其来保存froniter. (2)key/value是Berkeley DB用来管理数据的基础,每一个key/value对代表一条记录。 (3)Berkeley DB在底层实现採用B树。可以看成可以存储大量...

weixin_34185512的博客 328

关于Berkeley DB打开创建数据库文件

<br />使用BDB C# API进行基于数据库应用程序的开发,需要libdb51.dll,libdb_csharp51.dll和libdb_dotnet51.dll三个动态链接库。首先,在开发的工程中添加libdb_dotnet51.dll的引用,由于libdb_dotnet51.dll需要调用本地代码得到的libdb51.dll和libdb_csharp51.dll。因此,libdb51.dll,libdb_csharp51.dll应放在本工程路径或者环境变量中,以便运行时加载。开发过程中,在代码中添

dgh_85的专栏 3000

Berkeley DB 1.8.6源代码学习(三)

B树bt_page.c文件:辅助文件,用于页面的部分操作;__bt_free函数:将一个空闲页放入树的空闲列表;参数列表:t:树指针;h:空闲页指针;返回值:成功则返回RET_SUCCESS;伪代码:将h的左兄弟置无效;将h的有兄弟指向树的空闲列表头;将树的空闲列表头

missyou03的专栏 3556

Python Cookbook-7.8 使用 Berkeley DB 数据库

你想将一些数据做持久化处理,而且也想体验一下BerkeleyDB数据库的简洁和高效。

weixin_52297428的博客 1608

Berkeley DB

Berkeley DB是一个开源的文件数据库,介于关系数据库与内存数据库之间,使用方式与内存数据库类似,它提供的是一系列直接访问数据库的函数,而不是像关系数据库那样需要网络通讯、SQL解析等步骤

Berkeley DB数据库 6.2.32 64位

Berkeley DB 6.2.32_64.msi Windows 64-bit binary installer Berkeley DB是一个嵌入式数据库,为应用程序提供可伸缩的、高性能的、有事务保护功能的数据管理服务。 主要特点: 嵌入式:直接链接到应用程序中,与应用程序运行于同样的地址空间中,因此,无论是在网络上不同计算机之间还是在同一台计算机的不同进程之间,数据库操作并不要求进程间通讯。 Berkeley DB为多种编程语言提供了API接口,其中包括C、C++、Java、Perl、Tcl、Python和PHP,所有的数据库操作都在程序库内部发生。多个进程,或者同一进程的多个线程可同时使用数据库,有如各自单独使用,底层的服务如加锁、事务日志、共享缓冲区管理、内存管理等等都由程序库透明地执行。 轻便灵活:可以运行于几乎所有的UNIX和Linux系统及其变种系统、Windows操作系统以及多种嵌入式实时操作系统之下,已经被好多高端的因特网服务器、台式机、掌上电脑、机顶盒、网络交换机以及其他一些应用领域所采用。一旦Berkeley DB被链接到应用程序中,终端用户一般根本感觉不到有一个数据库系统存在。 可伸缩:Database library本身是很精简的(少于300KB的文本空间),但它能够管理规模高达256TB的数据库。它支持高并发度,成千上万个用户可同时操纵同一个数据库

Berkeley DB数据库最新版

Berkeley DB6.0.20 Berkeley DB BDB Berkeley DB数据库

Go-BTrDB高性能时间序列数据库旨在支持高密度数据存储应用

Berkeley Tree Database (BTrDB) server 高性能时间序列数据库,旨在支持高密度数据存储应用

关于光耦隔离与SP3485E芯片一起使用无法拉高485使能引脚问题

最近在做的一个项目,定制了一块STM32F407ZG的工控板,工控板载4个485接口全部都是只能接收数据,不能对外发送数据。1.接线不正确:接线不正确导致485收发出现问题。 2.程序端口初始化问题:控制光耦隔离的输入脚IO的初始化和置位状态有问题。 3.GPIO复用问题:控制对应串口的GPIO不是正点原子默认的GPIO,而是经过复用的其他IO,复用问题。 4.程序设置与485E芯片收发模式不对应:对于使能引脚的电平要根据光耦的输出情况确定输入IO与RE的关系,可能模式没有对应。 5.光耦隔离或者SP485

weixin_45862642的博客 2987

【知识点总结】电路原理 第一讲

大家好,从今天起,我将开始更新自上大学以来所学到的各种知识,之所以选择更新它们是因为最近我一直在收拾整理自己自上大学以来所收获到的各种知识,看着那厚厚一沓的书本心里不由得犯愁。如果我想找到特定的知识,那岂不是得翻到猴年马月。俗话说得好,下雨天打鞋子,闲着也是闲着,为此我设置一个专栏,将知识点一一分类总结,目的在于更好的整理所学的知识。本人学艺不精,有一些知识点地方可能存在瑕疵,希望各位大佬可以多多指教。以下是本篇文章正文内容虚断:一般通用性运算放大器的正反向输入端之间的电阻非常非常的大。

weixin_51130221的博客 4万+
上一篇: TRS在.NET下的开发组件 TRSADO.NET
下一篇: Sterling GIS: a outstanding tool to do data mapping
bakers
博客等级 码龄21年 10粉丝 25原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值