Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
86548ca5
Commit
86548ca5
authored
Sep 30, 2015
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fewer words in many places
parent
fd59b19d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
index.rst
index.rst
+22
-22
No files found.
index.rst
View file @
86548ca5
...
@@ -4,24 +4,22 @@ ZODB - a native object database for Python
...
@@ -4,24 +4,22 @@ ZODB - a native object database for Python
Because ZODB is an object database:
Because ZODB is an object database:
-
You don't use a separate language for database operations.
-
no separate language for database operations
-
There's very little impact on your code to make objects persistent.
-
very little impact on your code to make objects persistent
- You don't need a database mapper that partially hides the database
- no database mapper that partially hides the database.
from you.
Using an object-relational mapping **is not** like using an object database.
Using an object-relational mapping **is not** like using an object database.
-
There's almost no seam between your code and the
database.
-
almost no seam between code and
database.
Check out the :doc:`documentation/tutorial`!
Check out the :doc:`documentation/tutorial`!
Transactions
Transactions
============
============
Transactions make programs a lot easier to reason about for three
Make programs easier to reason about.
important reasons.
Transactions are atomic
Transactions are atomic
Changes made in a transaction are either saved in their entirety or
Changes made in a transaction are either saved in their entirety or
...
@@ -31,7 +29,7 @@ Transactions are atomic
...
@@ -31,7 +29,7 @@ Transactions are atomic
just abort the current transaction. You don't have to worry about
just abort the current transaction. You don't have to worry about
undoing previous database changes.
undoing previous database changes.
Transactions provide isolation
for managing concurrency
Transactions provide isolation
Transactions allow multiple logical threads (threads or processes)
Transactions allow multiple logical threads (threads or processes)
to access databases and the database prevents the threads from
to access databases and the database prevents the threads from
making conflicting changes.
making conflicting changes.
...
@@ -84,7 +82,7 @@ Database caching with invalidation
...
@@ -84,7 +82,7 @@ Database caching with invalidation
the number of clients. The server has to send an invalidation
the number of clients. The server has to send an invalidation
message to each client for each write.
message to each client for each write.
Testing is very easy.
Easy testing
ZODB provides in-memory storage implementations as well as
ZODB provides in-memory storage implementations as well as
copy-on-write layered "demo storage" implementations that make testing
copy-on-write layered "demo storage" implementations that make testing
database-related code very easy.
database-related code very easy.
...
@@ -106,12 +104,12 @@ Binary large objects, Blobs
...
@@ -106,12 +104,12 @@ Binary large objects, Blobs
When should you use ZODB?
When should you use ZODB?
=========================
=========================
When you want to focus on what your application does without database operations slowing you down
You want to focus on your application without writing a lot of database code.
Even if find you need to incorporate or switch to another database
Even if find you need to incorporate or switch to another database
later, you can use ZODB in the early part of your project to make
later, you can use ZODB in the early part of your project to make
initial discovery and learning much quicker.
initial discovery and learning much quicker.
When your application has complex relationships and data structures
Your application has complex relationships and data structures.
In relational databases you have to join tables to model complex
In relational databases you have to join tables to model complex
data structures and these joins can be tedious and expensive. You
data structures and these joins can be tedious and expensive. You
can mitigate this to some extent in databases like Postgres by using
can mitigate this to some extent in databases like Postgres by using
...
@@ -127,7 +125,7 @@ When your application has complex relationships and data structures
...
@@ -127,7 +125,7 @@ When your application has complex relationships and data structures
In ZODB, you can make objects as complex as you want and cross
In ZODB, you can make objects as complex as you want and cross
object relationships are handled with Python object references.
object relationships are handled with Python object references.
When the dominant access method is by accessing object attributes or by calling methods
You access data through object attributes and methods.
If your primary object access is search, then other database
If your primary object access is search, then other database
technologies might be a better fit.
technologies might be a better fit.
...
@@ -136,7 +134,7 @@ When the dominant access method is by accessing object attributes or by calling
...
@@ -136,7 +134,7 @@ When the dominant access method is by accessing object attributes or by calling
build higher-level search APIs on top of ZODB. These work well
build higher-level search APIs on top of ZODB. These work well
enough to support some search.
enough to support some search.
When you read data a lot more than you write it
You read data a lot more than you write it.
ZODB caches aggressively, and if you're working set fits (or mostly
ZODB caches aggressively, and if you're working set fits (or mostly
fits) in memory, performance is very good because it rarely has to
fits) in memory, performance is very good because it rarely has to
touch the database server.
touch the database server.
...
@@ -145,7 +143,7 @@ When you read data a lot more than you write it
...
@@ -145,7 +143,7 @@ When you read data a lot more than you write it
better off using something else. Sometimes, you can use a database
better off using something else. Sometimes, you can use a database
suitable for heavy writes in combination with ZODB.
suitable for heavy writes in combination with ZODB.
When you want to write tests of application logic that interacts with your database
Need to test logic that uses your database.
ZODB has a number of storage implementations, including layered
ZODB has a number of storage implementations, including layered
in-memory implementations that make testing very easy.
in-memory implementations that make testing very easy.
...
@@ -155,19 +153,20 @@ When you want to write tests of application logic that interacts with your datab
...
@@ -155,19 +153,20 @@ When you want to write tests of application logic that interacts with your datab
When should you *not* use ZODB?
When should you *not* use ZODB?
===============================
===============================
-
When s
earch is a dominant data access path
-
S
earch is a dominant data access path
-
When y
ou have high write volume
-
Y
ou have high write volume
-
When c
aching is unlikely to benefit you
-
C
aching is unlikely to benefit you
This can be the case when write volume is high, or when you tend to
This can be the case when write volume is high, or when you tend to
access small amounts of data from a working set way too large to fit in
access small amounts of data from a working set way too large to fit in
memory and when there's no good mechanism for dividing the working
memory and when there's no good mechanism for dividing the working
set across application servers.
set across application servers.
- When you need non-Python tools to access your database, especially
- You need to use non-Python tools to access your database.
tools designed to work with relational databases.
especially tools designed to work with relational databases
How does ZODB scale?
How does ZODB scale?
====================
====================
...
@@ -178,7 +177,7 @@ have been built on ZODB.
...
@@ -178,7 +177,7 @@ have been built on ZODB.
At Zope Corporation, several hundred newspaper content-management
At Zope Corporation, several hundred newspaper content-management
systems and web sites were hosted using a multi-database configuration
systems and web sites were hosted using a multi-database configuration
with most data in a main database and a catalog database. The
with most data in a main database and a catalog database. The
databases ha
ve
several hundred gigabytes of ordinary database records
databases ha
d
several hundred gigabytes of ordinary database records
plus multiple terabytes of blob data.
plus multiple terabytes of blob data.
ZODB is mature
ZODB is mature
...
@@ -187,8 +186,9 @@ ZODB is mature
...
@@ -187,8 +186,9 @@ ZODB is mature
ZODB is very mature. Development started in 1996 and it has been used
ZODB is very mature. Development started in 1996 and it has been used
in production in thousands of applications for many years.
in production in thousands of applications for many years.
ZODB is in heavy use in the :Pyramid and Plone communities and in many
ZODB is in heavy use in the `Pyramid <http://www.pylonsproject.org/>`_
other applications.
and `Plone <https://plone.org/>`_ communities and in many other
applications.
Learning more
Learning more
=============
=============
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment