SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
ZODB
The Zope Object Database
An introduction to the open source object database, by
Kiran Jonnalagadda <jace@pobox.com>
http://jace.seacrow.com/
Agenda
Where relational databases are unwieldy
The object database methodology
A brief introduction to Python
Mechanics of ZODB
Limitations
Resources
Relational Database Records
Record 1

Record 2

...

First Name

Atul

Kiran

...

Last Name

Chitnis

Age

41

24

...

Phone No.

344 0397

658 2921

...

Jonnalagadda ...

Individual Record Is Not Extensible

Extensible

Field
Issues with Relational DBs
Can’t store multiple values in a single field
Can’t add extra fields to individual records
Solved by adding extra relational tables
With complex data, this gets unmanageable
Developer time is wasted writing a database
interaction layer
Object Hierarchy
...

Atul Chitnis

First Name

Last Name
Address Book
Database

Kiran
Jonnalagadda
Age

...

...

Phone Number

...
Object Concepts
An object oriented database stores objects
instead of database records
Objects contain variables (data) and methods
to act on these variables; may be inherited
Objects are usually organised hierarchically
Most object databases are bound to a specific
language because each language implements
OOP differently
Introducing ZODB
High performance
Transparent Operation and Caching
Transactional: Unlimited Undo
Multi-threaded
Storage plugins
Needs Python
Why Python?
Python is a dynamic
typed and a strong
typed language
Python is dynamic:
everything can be
modified at runtime. Class
members, base
classes, whatever
What Dynamic Means

Variables Are: Dynamic Typed

Static Typed

Strong Typed

Python

C, C++, Java

Weak Typed

Perl, PHP, JS,
Shell Script

*
What ZODB is Not
Not a relational database
No SQL support
No security model
No query interface:
Objects must be accessed via container
A separate search engine is available
ZODB: The Mechanics
Really Simple Usage
All classes must be derived from the
“Persistent” base class provided by ZODB
At the start of your program, open a ZODB
connection
Commit the transaction periodically
That is all!
Code need not be ZODB aware
Example Code
# Necessary imports
from ZODB import FileStorage, DB
from Persistence import Persistent
# Connect to a database
storage = FileStorage.FileStorage('/tmp/test-filestorage.fs')
db = DB(storage)
conn = db.open()
# Get the root of the database
dbroot = conn.root()
# Defining user classes
class UserDataClass(Persistent):
pass
# Commit or abort after making a change
get_transaction().commit()
get_transaction().abort()
Remote Storage: ZEO
ZEO is Zope Enterprise Objects
One ZEO serves multiple ZODB clients
Databases can be mounted on each other, just
like file systems
No replicated storage yet
Available ZODB Storages
FileStorage (standard)
The entire database is stored in a single file
DirectoryStorage
Each object is stored as a separate file
BerkeleyDB Storage
The database is stored in BerkeleyDB
ClientStorage
Database is stored in a remote ZEO database
Limitations
Only available via Python
Transparency is sometimes undesirable
Cannot detect changes in objects not derived
from the Persistent base class, like a list or
dictionary
Programmer has to flag such objects as dirty
ZEO is optimised for heavy reads, not writes
Resources
ZODB Product Page:
http://zope.org/Products/StandaloneZODB
ZEO Product Page:
http://zope.org/Products/ZEO/
An introduction to ZODB and ZEO:
http://www.amk.ca/zodb/zodb-zeo.html
The Indian Zope and Python User Group:
http://groups.yahoo.com/group/izpug
Thank You!
This presentation is available online at:
http://jace.seacrow.com/tech/zope/blug-zodb

Weitere ähnliche Inhalte

Was ist angesagt?

Object oriented programming concepts
Object oriented programming conceptsObject oriented programming concepts
Object oriented programming conceptsrahuld115
 
2 lesson 2 object oriented programming in c++
2 lesson 2 object oriented programming in c++2 lesson 2 object oriented programming in c++
2 lesson 2 object oriented programming in c++Jeff TUYISHIME
 
Session 22 - Java IO, Serialization
Session 22 - Java IO, SerializationSession 22 - Java IO, Serialization
Session 22 - Java IO, SerializationPawanMM
 
Introduction to NHibernate
Introduction to NHibernateIntroduction to NHibernate
Introduction to NHibernateDublin Alt,Net
 
Java Input Output (java.io.*)
Java Input Output (java.io.*)Java Input Output (java.io.*)
Java Input Output (java.io.*)Om Ganesh
 
Xml processing-by-asfak
Xml processing-by-asfakXml processing-by-asfak
Xml processing-by-asfakAsfak Mahamud
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programmingSachin Sharma
 
java.io - streams and files
java.io - streams and filesjava.io - streams and files
java.io - streams and filesMarcello Thiry
 
6 Months Project Training in PHP
6 Months Project Training in PHP6 Months Project Training in PHP
6 Months Project Training in PHPTech Mentro
 
NHibernate for .NET
NHibernate for .NETNHibernate for .NET
NHibernate for .NETGuo Albert
 
Session 23 - JDBC
Session 23 - JDBCSession 23 - JDBC
Session 23 - JDBCPawanMM
 
Java - File Input Output Concepts
Java - File Input Output ConceptsJava - File Input Output Concepts
Java - File Input Output ConceptsVicter Paul
 
Xml query language and navigation
Xml query language and navigationXml query language and navigation
Xml query language and navigationRaghu nath
 

Was ist angesagt? (19)

Handling I/O in Java
Handling I/O in JavaHandling I/O in Java
Handling I/O in Java
 
Object oriented programming concepts
Object oriented programming conceptsObject oriented programming concepts
Object oriented programming concepts
 
2 lesson 2 object oriented programming in c++
2 lesson 2 object oriented programming in c++2 lesson 2 object oriented programming in c++
2 lesson 2 object oriented programming in c++
 
Session 22 - Java IO, Serialization
Session 22 - Java IO, SerializationSession 22 - Java IO, Serialization
Session 22 - Java IO, Serialization
 
Introduction to NHibernate
Introduction to NHibernateIntroduction to NHibernate
Introduction to NHibernate
 
Java Input Output (java.io.*)
Java Input Output (java.io.*)Java Input Output (java.io.*)
Java Input Output (java.io.*)
 
Xml processing-by-asfak
Xml processing-by-asfakXml processing-by-asfak
Xml processing-by-asfak
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
java.io - streams and files
java.io - streams and filesjava.io - streams and files
java.io - streams and files
 
Java file
Java fileJava file
Java file
 
6 Months Project Training in PHP
6 Months Project Training in PHP6 Months Project Training in PHP
6 Months Project Training in PHP
 
NHibernate for .NET
NHibernate for .NETNHibernate for .NET
NHibernate for .NET
 
Session 23 - JDBC
Session 23 - JDBCSession 23 - JDBC
Session 23 - JDBC
 
Java - File Input Output Concepts
Java - File Input Output ConceptsJava - File Input Output Concepts
Java - File Input Output Concepts
 
Dom
DomDom
Dom
 
PostgreSQL - Case Study
PostgreSQL - Case StudyPostgreSQL - Case Study
PostgreSQL - Case Study
 
Jndi
JndiJndi
Jndi
 
[OOP - Lec 06] Classes and Objects
[OOP - Lec 06] Classes and Objects[OOP - Lec 06] Classes and Objects
[OOP - Lec 06] Classes and Objects
 
Xml query language and navigation
Xml query language and navigationXml query language and navigation
Xml query language and navigation
 

Ähnlich wie ZODB, the Zope Object Database (May 2003)

Hibernate
HibernateHibernate
HibernateAjay K
 
NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021Thodoris Bais
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPagesToby Samples
 
Free Hibernate Tutorial | VirtualNuggets
Free Hibernate Tutorial  | VirtualNuggetsFree Hibernate Tutorial  | VirtualNuggets
Free Hibernate Tutorial | VirtualNuggetsVirtual Nuggets
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate pptAneega
 
MPTStore: A Fast, Scalable, and Stable Resource Index
MPTStore: A Fast, Scalable, and Stable Resource IndexMPTStore: A Fast, Scalable, and Stable Resource Index
MPTStore: A Fast, Scalable, and Stable Resource IndexChris Wilper
 
Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...
Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...
Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...GeeksLab Odessa
 
Pursuing Domain-Driven Design practices in PHP
Pursuing Domain-Driven Design practices in PHPPursuing Domain-Driven Design practices in PHP
Pursuing Domain-Driven Design practices in PHPGiorgio Sironi
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Julie Lerman
 

Ähnlich wie ZODB, the Zope Object Database (May 2003) (20)

Hibernate 3
Hibernate 3Hibernate 3
Hibernate 3
 
Hibernate
HibernateHibernate
Hibernate
 
Hibernate training-topics
Hibernate training-topicsHibernate training-topics
Hibernate training-topics
 
Hibernate
HibernateHibernate
Hibernate
 
ZODB Tips and Tricks
ZODB Tips and TricksZODB Tips and Tricks
ZODB Tips and Tricks
 
ZODB Tips and Tricks
ZODB Tips and TricksZODB Tips and Tricks
ZODB Tips and Tricks
 
NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021
 
Hibernate
HibernateHibernate
Hibernate
 
Introduction to odbms
Introduction to odbmsIntroduction to odbms
Introduction to odbms
 
Hibernate
HibernateHibernate
Hibernate
 
Core Data
Core DataCore Data
Core Data
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
 
Free Hibernate Tutorial | VirtualNuggets
Free Hibernate Tutorial  | VirtualNuggetsFree Hibernate Tutorial  | VirtualNuggets
Free Hibernate Tutorial | VirtualNuggets
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate ppt
 
MPTStore: A Fast, Scalable, and Stable Resource Index
MPTStore: A Fast, Scalable, and Stable Resource IndexMPTStore: A Fast, Scalable, and Stable Resource Index
MPTStore: A Fast, Scalable, and Stable Resource Index
 
Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...
Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...
Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...
 
ProjectHub
ProjectHubProjectHub
ProjectHub
 
Pursuing Domain-Driven Design practices in PHP
Pursuing Domain-Driven Design practices in PHPPursuing Domain-Driven Design practices in PHP
Pursuing Domain-Driven Design practices in PHP
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)
 

Mehr von Kiran Jonnalagadda

AirJaldi photo rout (April 2008)
AirJaldi photo rout (April 2008)AirJaldi photo rout (April 2008)
AirJaldi photo rout (April 2008)Kiran Jonnalagadda
 
The medium without the message (April 2008)
The medium without the message (April 2008)The medium without the message (April 2008)
The medium without the message (April 2008)Kiran Jonnalagadda
 
Understanding technology in e-governance (December 2007)
Understanding technology in e-governance (December 2007)Understanding technology in e-governance (December 2007)
Understanding technology in e-governance (December 2007)Kiran Jonnalagadda
 
Namma service cash tracking system (January 2007)
Namma service cash tracking system (January 2007)Namma service cash tracking system (January 2007)
Namma service cash tracking system (January 2007)Kiran Jonnalagadda
 
What ails the Sarai Reader List? (August 2005)
What ails the Sarai Reader List? (August 2005)What ails the Sarai Reader List? (August 2005)
What ails the Sarai Reader List? (August 2005)Kiran Jonnalagadda
 
On blogging as a career (June 2005)
On blogging as a career (June 2005)On blogging as a career (June 2005)
On blogging as a career (June 2005)Kiran Jonnalagadda
 
Python's dynamic nature (rough slides, November 2004)
Python's dynamic nature (rough slides, November 2004)Python's dynamic nature (rough slides, November 2004)
Python's dynamic nature (rough slides, November 2004)Kiran Jonnalagadda
 
Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Kiran Jonnalagadda
 
Human database relations (March 2004)
Human database relations (March 2004)Human database relations (March 2004)
Human database relations (March 2004)Kiran Jonnalagadda
 
The technology of the Human Protein Reference Database (draft, 2003)
The technology of the Human Protein Reference Database (draft, 2003)The technology of the Human Protein Reference Database (draft, 2003)
The technology of the Human Protein Reference Database (draft, 2003)Kiran Jonnalagadda
 
Introduction to Plone (November 2003)
Introduction to Plone (November 2003)Introduction to Plone (November 2003)
Introduction to Plone (November 2003)Kiran Jonnalagadda
 
Some dope on Zope (Jan 2002, Bangalore LUG)
Some dope on Zope (Jan 2002, Bangalore LUG)Some dope on Zope (Jan 2002, Bangalore LUG)
Some dope on Zope (Jan 2002, Bangalore LUG)Kiran Jonnalagadda
 
e-Governance in Karnataka: An introduction
e-Governance in Karnataka: An introductione-Governance in Karnataka: An introduction
e-Governance in Karnataka: An introductionKiran Jonnalagadda
 

Mehr von Kiran Jonnalagadda (17)

AirJaldi photo rout (April 2008)
AirJaldi photo rout (April 2008)AirJaldi photo rout (April 2008)
AirJaldi photo rout (April 2008)
 
The medium without the message (April 2008)
The medium without the message (April 2008)The medium without the message (April 2008)
The medium without the message (April 2008)
 
Understanding technology in e-governance (December 2007)
Understanding technology in e-governance (December 2007)Understanding technology in e-governance (December 2007)
Understanding technology in e-governance (December 2007)
 
Namma service cash tracking system (January 2007)
Namma service cash tracking system (January 2007)Namma service cash tracking system (January 2007)
Namma service cash tracking system (January 2007)
 
What ails the Sarai Reader List? (August 2005)
What ails the Sarai Reader List? (August 2005)What ails the Sarai Reader List? (August 2005)
What ails the Sarai Reader List? (August 2005)
 
On blogging as a career (June 2005)
On blogging as a career (June 2005)On blogging as a career (June 2005)
On blogging as a career (June 2005)
 
Python's dynamic nature (rough slides, November 2004)
Python's dynamic nature (rough slides, November 2004)Python's dynamic nature (rough slides, November 2004)
Python's dynamic nature (rough slides, November 2004)
 
Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)
 
Human database relations (March 2004)
Human database relations (March 2004)Human database relations (March 2004)
Human database relations (March 2004)
 
The technology of the Human Protein Reference Database (draft, 2003)
The technology of the Human Protein Reference Database (draft, 2003)The technology of the Human Protein Reference Database (draft, 2003)
The technology of the Human Protein Reference Database (draft, 2003)
 
Introduction to Plone (November 2003)
Introduction to Plone (November 2003)Introduction to Plone (November 2003)
Introduction to Plone (November 2003)
 
XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)
 
Some dope on Zope (Jan 2002, Bangalore LUG)
Some dope on Zope (Jan 2002, Bangalore LUG)Some dope on Zope (Jan 2002, Bangalore LUG)
Some dope on Zope (Jan 2002, Bangalore LUG)
 
User Management with LastUser
User Management with LastUserUser Management with LastUser
User Management with LastUser
 
Sustainability and bit-rot
Sustainability and bit-rotSustainability and bit-rot
Sustainability and bit-rot
 
e-Governance in Karnataka: An introduction
e-Governance in Karnataka: An introductione-Governance in Karnataka: An introduction
e-Governance in Karnataka: An introduction
 
Cyberpunk Sci-Fi
Cyberpunk Sci-FiCyberpunk Sci-Fi
Cyberpunk Sci-Fi
 

Kürzlich hochgeladen

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Kürzlich hochgeladen (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

ZODB, the Zope Object Database (May 2003)

  • 1. ZODB The Zope Object Database An introduction to the open source object database, by Kiran Jonnalagadda <jace@pobox.com> http://jace.seacrow.com/
  • 2. Agenda Where relational databases are unwieldy The object database methodology A brief introduction to Python Mechanics of ZODB Limitations Resources
  • 3. Relational Database Records Record 1 Record 2 ... First Name Atul Kiran ... Last Name Chitnis Age 41 24 ... Phone No. 344 0397 658 2921 ... Jonnalagadda ... Individual Record Is Not Extensible Extensible Field
  • 4. Issues with Relational DBs Can’t store multiple values in a single field Can’t add extra fields to individual records Solved by adding extra relational tables With complex data, this gets unmanageable Developer time is wasted writing a database interaction layer
  • 5. Object Hierarchy ... Atul Chitnis First Name Last Name Address Book Database Kiran Jonnalagadda Age ... ... Phone Number ...
  • 6. Object Concepts An object oriented database stores objects instead of database records Objects contain variables (data) and methods to act on these variables; may be inherited Objects are usually organised hierarchically Most object databases are bound to a specific language because each language implements OOP differently
  • 7. Introducing ZODB High performance Transparent Operation and Caching Transactional: Unlimited Undo Multi-threaded Storage plugins Needs Python
  • 8. Why Python? Python is a dynamic typed and a strong typed language Python is dynamic: everything can be modified at runtime. Class members, base classes, whatever
  • 9. What Dynamic Means Variables Are: Dynamic Typed Static Typed Strong Typed Python C, C++, Java Weak Typed Perl, PHP, JS, Shell Script *
  • 10. What ZODB is Not Not a relational database No SQL support No security model No query interface: Objects must be accessed via container A separate search engine is available
  • 12. Really Simple Usage All classes must be derived from the “Persistent” base class provided by ZODB At the start of your program, open a ZODB connection Commit the transaction periodically That is all! Code need not be ZODB aware
  • 13. Example Code # Necessary imports from ZODB import FileStorage, DB from Persistence import Persistent # Connect to a database storage = FileStorage.FileStorage('/tmp/test-filestorage.fs') db = DB(storage) conn = db.open() # Get the root of the database dbroot = conn.root() # Defining user classes class UserDataClass(Persistent): pass # Commit or abort after making a change get_transaction().commit() get_transaction().abort()
  • 14. Remote Storage: ZEO ZEO is Zope Enterprise Objects One ZEO serves multiple ZODB clients Databases can be mounted on each other, just like file systems No replicated storage yet
  • 15. Available ZODB Storages FileStorage (standard) The entire database is stored in a single file DirectoryStorage Each object is stored as a separate file BerkeleyDB Storage The database is stored in BerkeleyDB ClientStorage Database is stored in a remote ZEO database
  • 16. Limitations Only available via Python Transparency is sometimes undesirable Cannot detect changes in objects not derived from the Persistent base class, like a list or dictionary Programmer has to flag such objects as dirty ZEO is optimised for heavy reads, not writes
  • 17. Resources ZODB Product Page: http://zope.org/Products/StandaloneZODB ZEO Product Page: http://zope.org/Products/ZEO/ An introduction to ZODB and ZEO: http://www.amk.ca/zodb/zodb-zeo.html The Indian Zope and Python User Group: http://groups.yahoo.com/group/izpug
  • 18. Thank You! This presentation is available online at: http://jace.seacrow.com/tech/zope/blug-zodb