\documentclass[11pt]{beamer} \usepackage[french]{babel} \usepackage[latin1]{inputenc} \usepackage{times} \usepackage{graphics} \setbeamercovered{dynamic} \usetheme{Copenhagen} \title{The Zope Object Database (ZODB)} \date{23/03/2006} \author{Arnaud Fontaine} \logo{\includegraphics[height=0.7cm]{python}} \makeatletter \def\verbatim@font{\fontfamily{cmtt}\fontseries{m}\fontsize{6}{1}\selectfont} \def\verb@font{\fontfamily{cmtt}\fontseries{m}\fontsize{6}{1}\selectfont} \makeatother \AtBeginSection[]{\frame{\frametitle{Plan}\tableofcontents[current]}} \begin{document} \begin{frame} \titlepage \end{frame} % Table des matières \part{Main Part} \begin{frame}{Plan} \tableofcontents[part=1] \end{frame} \section{Introduction} \begin{frame} \textit{« A database is a collection of records stored in a computer in a systematic way, so that a computer program can consult it to answer questions. »} \begin{block}{Main properties of a database} \begin{itemize} \item a record (tuple) is organized a set of data elements \item a schema gives the structure of the database \item the Database Management Systems (\textit{DBMS}) is a program which allows management and queries \end{itemize} \end{block} \end{frame} \section{Database models} \subsection{Relational model} \begin{frame} \begin{block}{Specifications} \begin{itemize} \item the data are organized in table, also known as relation \item a table consists in two-dimensional array \end{itemize} \end{block} A relation can have two kinds of keys : \begin{itemize} \item primary keys \item foreign keys \end{itemize} An operation is usually written in Structured Query Language (\textit{SQL}) \end{frame} \begin{frame} \begin{block}{Examples} \begin{center} \begin{tabular}{|l|l|l|} \hline \multicolumn{3}{|c|}{User table}\\ \hline \textbf{\textit{nickname}} & \textbf{name} & \textbf{surname}\\ \hline aaa & bbb & ccc\\ \hline xxx & yyy & zzz\\ \hline \end{tabular} \end{center} \begin{itemize} \item Operations available on tuples : SELECT, INSERT, UPDATE and DELETE \item Operations available on tables : CREATE, DROP \end{itemize} \end{block} \end{frame} \subsection{Object model} \begin{frame} \begin{block}{Specifications} \begin{itemize} \item information is represented in the form of objects \item closer to the application programming \end{itemize} \end{block} This kind of database allows programmers to write object oriented code in a more transparent way \end{frame} \section{Object Oriented Programming} \subsection{Presentation} \begin{frame} \begin{block}{Specification} \begin{itemize} \item programs are composed of a collection of individuals units, also known as object \item closer to the \textit{real world} \end{itemize} \end{block} \begin{block}{Concepts} \begin{itemize} \item class \item inheritance \item polymorphism \end{itemize} \end{block} \end{frame} \subsection{The python programming language} \begin{frame}[fragile,shrink=5] \begin{block}{Specifications} \begin{itemize} \item high level interpreted language \item cross platform \item dynamically type-checked \item object orientation \item extensibility \item easy to learn \end{itemize} \end{block} \begin{exampleblock}{Python versus traditional language} \begin{minipage}[t]{3cm} \begin{verbatim} int factorial(int x) { if (x == 0) { return 1; } else { return x * factorial(x-1); } } \end{verbatim} \end{minipage} \hspace{2cm} \begin{minipage}[t]{3cm} \begin{verbatim} def factorial(x): if x == 0: return 1 else: return x * factorial(x-1) \end{verbatim} \end{minipage} \end{exampleblock} \end{frame} \section{ZODB} \begin{frame} \begin{block}{Specification} \begin{itemize} \item persistence \item python-specific OODB \item optimize for reading \item history \end{itemize} Like posgresql or mysql SQL implementation, we have : \begin{itemize} \item atomicity \item consistency \item isolation \item durability \end{itemize} \end{block} \end{frame} \begin{frame} \end{frame} \section{Conclusion} \begin{frame} Finally, ZODB : \begin{itemize} \item is a pythonic database \item provides all the needed database stuff \item is a robust database included in ZOPE \end{itemize} \end{frame} \end{document}