<!--$Id: progmodel.so,v 10.27 2001/03/01 15:57:54 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Programming model</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Architecture</dl></b></td>
<td align=right><a href="../arch/bigpic.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../arch/apis.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p align=center><b>Programming model</b></p>
<p>Berkeley DB is a database library, in which the library is linked into the
address space of the application using it. The code using Berkeley DB may be
a standalone application or it may be a server providing functionality
to many clients via inter-process or remote-process communication
(IPC/RPC).</p>
<p>In the standalone application model, one or more applications link the
Berkeley DB library directly into their address spaces. There may be many
threads of control in this model because Berkeley DB supports locking for both
multiple processes and for multiple threads within a process. This
model provides significantly faster access to the database
functionality, but implies trust among all threads of control sharing
the database environment because they will have the ability to read,
write and potentially corrupt each other's data.</p>
<p>In the client-server model, developers write a database server
application that accepts requests via some form of IPC/RPC, and issues
calls to the Berkeley DB interfaces based on those requests. In this model,
the database server is the only application linking the Berkeley DB library
into its address space. The client-server model trades performance for
protection because it does not require that the applications share a
protection domain with the server, but IPC/RPC is slower than a function
call. Of course, this model also greatly simplifies the creation of
network client-server applications.</p>
<table width="100%"><tr><td><br></td><td align=right><a href="../arch/bigpic.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../arch/apis.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez