Berkeley DB三大产品收费模式

2009年11月5日 chaohuang 10 条评论

众所周知,Berkeley DB是开源的,个人用户可以下载做学习、试用。但实际上,Berkeley DB是Oracle的一个产品,也是要收费的。

英文好的同学,可以读一下我们的授权申明:http://www.oracle.com/technology/software/products/berkeley-db/htdocs/licensing.html。

英文不好的同学,我在此可以稍作解释(强调:我的观点仅作参考,Oracle公司拥有最终解释权):

1.  Berkeley DB产品家族三大产品(BDB,BDB-JE和BDB-XML)都是采取双license的授权模式,即开源(免费使用)和商用(付费使用)两种模式。

2. 衡量两种授权模式的一个主要区别是 – “redistribute”,意即你是否将自己的应用程序(在你的应用中使用了BDB)发布给第三方,如客户,机构,附属机构,母公司,合作者,中间商,第三方的非营利组织等。

3. 举例子来说:

  • 如果是个人用户做学习研究之用,可以选择开源授权,免费;
  • 如果是个人用户在BDB上做一些应用,如果你的应用是开源发布的,可以选择开源授权(但要符合BSD、GPL等开源条款);如果是闭源,需要选择商业授权;
  • 如果是在公司的商用项目使用,需要选择商业授权,即付费;

如果大家再有问题,或者不确定,欢迎留言。版权保护,也是保护到每个IT从业人员。

附件: Oracle官方网站给出TimesTen和Berkeley DB 产品家族在美国市场参考价格(见下图)。

Berkeley DB 价格清单

Berkeley DB 价格清单

关于Oracle产品的价格清单,请浏览官方网址: http://www.oracle.com/corporate/pricing/pricelists.html.

注意: 价格仅作参考,Oracle公司拥有最终解释权。

BDB Java Edition + prefuse, 轻松实现数据可视化

2010年3月8日 haomianwang 没有评论

数据可视化概述

这些年来,随着大量数据的产生,数据可视化(data visualization)广泛应用于科研、军事、金融、医疗等等领域。我们的生活也到处可见数据可视化的例子。比如,股票软件上显示的K线图,调查结果的柱状图、曲线图,人口分布的密度图等等等等。

那么,什么是数据可视化呢?根据维基百科的解释:Data visualization is the study of the visual representation of data, meaning “information which has been abstracted in some schematic form, including attributes or variables for the units of information”。简单来说,数据可视化就是用更加直观更加生动易懂的图形图像表现某种特定的数据集合。

这篇文章将简单介绍如何轻松利用BDB Java Edition (JE)和prefuse实现自己的数据可视化应用。

可视化工具和数据库的选择

首先我们选择prefuse作为数据可视化工具。prefuse是一个轻量级的用于可视化任意数据集(visualize the data)的java类库,它提供了多种数据可视化模式,比如柱状图、树图、饼图等等。它的优点是简单易用、可视化功能齐全。

但仅仅有可视化工具是不够的,还需要什么呢?当然还必须有存储数据的数据库。可以打个比方,数据是一栋房子,数据可视化就是我们要给房子做装修,让它更好看,那么数据库就是地基。没有地基,何来房子,更不用说装修了。那么,我们选择什么样的数据库呢。既然prefuse是java类库,而我们JE的特点是纯Java实现,性能高,footprint小等等,那么,JE绝对是一个很好的选择。

好了,现在就让我们看看JE + prefuse的威力吧。 阅读全文…

Berkeley DB 批量插入更新与删除用法示例

2010年3月1日 davidzhao 没有评论

在Berkeley DB 4.8之前,我们可以执行的唯一的批量数据库操作是批量读取。
从Berkeley DB 4.8开始,Berkeley DB支持批量插入/更新/删除,并且用法也与批量读取相似。
批量插入/更新/删除对Berkeley DB的更新性能提升非常大,是一个值得认真学习的新功能。
本文就以一个示例程序展示批量插入和批量删除的用法。
阅读全文…

分类: Berkeley DB, David Zhao 标签:

Berkeley DB XML 多线程添加文档例子

2010年3月1日 蔡瀛 2 条评论
import java.io.File;
import java.util.concurrent.CountDownLatch;

import com.sleepycat.db.Environment;
import com.sleepycat.db.EnvironmentConfig;
import com.sleepycat.db.LockDetectMode;
import com.sleepycat.dbxml.XmlContainer;
import com.sleepycat.dbxml.XmlContainerConfig;
import com.sleepycat.dbxml.XmlDocument;
import com.sleepycat.dbxml.XmlDocumentConfig;
import com.sleepycat.dbxml.XmlException;
import com.sleepycat.dbxml.XmlManager;
import com.sleepycat.dbxml.XmlManagerConfig;
import com.sleepycat.dbxml.XmlQueryContext;
import com.sleepycat.dbxml.XmlResults;
import com.sleepycat.dbxml.XmlTransaction;
import com.sleepycat.dbxml.XmlUpdateContext;

public class DbxmlThreads extends Thread {

        public static XmlManager mgr = null;
        public static String containerName = "test.dbxml";
        public static Environment dbEnv = null;
        private static XmlContainer cont = null;

        static {
                EnvironmentConfig envConf = new EnvironmentConfig();
                envConf.setThreaded(true);
                envConf.setAllowCreate(true);
                envConf.setTransactional(true);
                envConf.setInitializeCache(true);
                envConf.setInitializeLocking(true);
                envConf.setInitializeLogging(true);
                envConf.setCacheSize(64 * 1024 * 1024);
                envConf.setLockDetectMode(LockDetectMode.DEFAULT);

                XmlManagerConfig xmlMgrConfig = new XmlManagerConfig();
                xmlMgrConfig.setAdoptEnvironment(true);

                File dbHome = new File(".");

                try {
                        dbEnv = new Environment(dbHome, envConf);
                        mgr = new XmlManager(dbEnv, xmlMgrConfig);

                        // 创建XmlContainer
                        if(mgr.existsContainer(containerName)!=0)
                                mgr.removeContainer(containerName);

                        XmlContainerConfig containerConf = new XmlContainerConfig();
                        containerConf.setTransactional(true);
                        containerConf.setAllowCreate(true);
                        containerConf.setContainerType(XmlContainer.NodeContainer);
                        cont = mgr.openContainer(containerName, containerConf);
                        cont.setAutoIndexing(false);
                } catch (Exception e) {
                        e.printStackTrace();
                }

        }

        private String name;
        private CountDownLatch doneSignal;

        DbxmlThreads(String name, CountDownLatch doneSignal) {
                this.name = name;
                this.doneSignal = doneSignal;
        }

        public void run() {
                XmlTransaction txn = null;
                try {
                        String content = "<"+name+">I am "+name+"";
                        for (int i = 0; i < 100; i++) {
                                XmlDocumentConfig dc = new XmlDocumentConfig();
                                dc.setGenerateName(true);
                                System.out.println(name+" insert "+i);
                                txn = mgr.createTransaction();

                                XmlDocument doc = mgr.createDocument();
                                doc.setContent(content);
                                cont.putDocument(txn, doc, dc);

                                txn.commit();
                        }
                } catch (XmlException e) {
                        System.out.println("insert error:" + e.getMessage());
                } finally {
                        doneSignal.countDown();
                }
        }

        public static void main(String[] args) throws Exception {

                CountDownLatch doneSignal = new CountDownLatch(5);
                DbxmlThreads threadA = new DbxmlThreads("A", doneSignal);
                DbxmlThreads threadB = new DbxmlThreads("B", doneSignal);
                DbxmlThreads threadC = new DbxmlThreads("C", doneSignal);
                DbxmlThreads threadD = new DbxmlThreads("D", doneSignal);
                DbxmlThreads threadE = new DbxmlThreads("E", doneSignal);

                threadA.start();
                threadB.start();
                threadC.start();
                threadD.start();
                threadE.start();

                doneSignal.await();

                XmlQueryContext qc = mgr.createQueryContext();
                String query = "collection('"+containerName+"')/A";
                XmlResults res = mgr.query(query, qc);
                System.out.println("The results size is: "+res.size());
                res.delete();
                cont.close();
                mgr.close();
        }

}

Berkeley DB Java Edition Resources

2010年2月24日 chaohuang 没有评论

Resources

  • The Berkeley DB Java Edition FAQ has useful tips and should be a first stop when trouble shooting problems.
  • You can find product information, datasheets, and whitepapers on the JE home page on OTN.
  • All JE release images are on the JE download page.
  • The JE documentation page has Javadoc, Getting Started Guides and tutorials.
  • Here is the JE License.
  • Charles Lamb, a JE developer, blogs about usage tips, announcements, and developer anecdotes.
  • There’s a whitepaper called Performing Queries in Oracle Berkeley DB Java Edition. The whitepaper takes common SQL queries and shows how to execute the same logic using the Direct Persistence Layer (DPL). The goal is to give users who are familiar with SQL some help in learning how to use the DPL.
  • Chinese language JE blogs are available at www.bdbchina.com
  • Application source code examples are included as part of the Berkeley DB JE distribution in the examples directory.
分类: Berkeley DB JE, David Zhao 标签:

Berkeley DB Java Edition Android/Google Maps Demo

2010年2月24日 chaohuang 没有评论

Thanks to Chris Eastland at Nebula Software Systems for the screen shot of this cool Google Maps/Android app built on BDB JE. The location data is stored in a JE database running on the device.

See the details at Charles Lamb’s blog at http://blogs.oracle.com/charlesLamb/2010/02/berkeley_db_java_edition_andro.html .

Berkeley DB Java Edition/Android Whitepaper

2010年2月24日 chaohuang 没有评论

Charles Lamb (BDB-JE 架构师) 最近发表的一篇关于在Google Android运行Berkeley DB Java Edition的白皮书。书中简要描述了JE在在Android平台上运行的一些优势和特点,诸如性能,可扩展性,索引,并发控制,事务和多对多的 事物-线程映射模型。

原文地址: http://www.oracle.com/technology/products/berkeley-db/pdf/bdb-je-android.pdf .

分类: Berkeley DB JE, Chao Huang 标签: ,

Berkeley DB Java Edition: Handling Transactions in JE 4.0

2010年2月24日 chaohuang 没有评论

In his blog ( http://blogs.sun.com/jhalex/entry/handling_transactions_in_bdb_je ), Jeff Alexander of Sun’s project Aura describes how they’ve standardized on a calling convention for JE which provides uniform, yet flexible, transaction and exception handling.

分类: Berkeley DB JE, Chao Huang 标签:

在JSP中使用Berkeley DB Java Edition

2010年2月24日 chaohuang 没有评论

有来自开源社区的BDB-JE用户写的一篇博客,介绍了如何在JSP中使用JE来存取Java对象。英文好的朋友或者项目中有类似需求的朋友,不妨看看。原文地址为:http://reecegriffin.com/blog/berkeleyje.html。

在这篇博客中,作者简要提到了最新的JE 4.0 发布的新特性 – Replication。简言之就是支持高可用或集群功能,并提供了软件和硬件层面的负载均衡。个人认为,JE 4.0的高可用功能绝对是任务密集型的、要求7×24小时高可用的J2EE应用项目中的利器啊。 :-)

最后,欢迎留言。

分类: Berkeley DB JE, Chao Huang 标签: ,

欢迎加入Berkeley DB群@LinkedIn

2010年2月22日 chaohuang 没有评论

首先祝各位访客新年快乐,虎年富贵吉祥!

Oracle Berkeley DB在LinkedIn.com上的新建了一个群,供全球的相关人士(包括工程师、产品经理、客户等)共同讨论Berkeley DB的话题和业界动态。群地址:http://www.linkedin.com/groups?gid=2131985. 欢迎加入!

Oracle Berkeley DB 中国研发团队

Patch Releases of Oracle Berkeley DB Java Edition

2010年2月20日 chaohuang 没有评论

The Oracle Berkeley DB team is pleased to announce the availability of Berkeley DB Java Edition for all supported platforms (BDB JE).

One major focus of Berkeley DB has been replication for high availability (HA), the other is support for the Google Android phone platform.
* Read the new “BDB JE on Android” whitepaper
* See a screenshot of JE running on Android storing map coordinates displayed on Google Maps
* Search Oracle.com for Android (google: “site:oracle.com android”) note that most results are about BDB JE

Berkeley DB Java Edition (JE) 4.0.92

Includes the following new features and changes:

* Enhancements have been added for JE High Availability, which supports the use of JE with replication.
* The monitor package has several new event types which help a replicated application track replication group changes. A new example has been added to the replication example group to illustrate the use of RMI in replication write request forwarding.
* New properties have been added to help administer a replication group in the face of major hardware failure.
* A new RMI based example has been added to the set of JE HA Examples.
* See the High Availability Guide for an introduction to the product, and the com.sleepycat.je.rep javadoc for API specifications.
* JE’s MBeans and JConsole plugin have several new methods and capabilities to improve the ability to monitor an application. See the how-to for more information.
* Changes were made to make it easier to control JE’s use of java.util.logging through programmatic means.
* A number of bug fixes were made to work around problems in the Dvalvik libraries used by Android applications.
* A number of general bug fixes, performance improvements, and documentation improvements were made.

Software Downloads

* Downloads available today at http://download.oracle.com/berkeley-db/je-4.0.92.zip.

Questions?

Please direct your questions to our OTN forum at http://forums.oracle.com/forums/forum.jspa?forumID=273.

分类: Berkeley DB JE, Chao Huang 标签: ,