The

Introdu tion

The Basi s

Relational databases

Numeri al Binary Formats

Summary

Data Serialization

From pi kle to databases and HDF5

Fran es

Alted

Freelan e Developer and PyTables Creator

Advan ed S ienti

Programming in Python

2010 Autumn S hool, Trento, Italy

Fran es

Alted

Data Serialization

Introdu tion

The Basi s

Relational databases

Numeri al Binary Formats

Summary

Outline

1

Introdu tion

2

The Basi s

Pi kling our obje ts

The shelve module

3

Relational databases

What's a relational database?

Queries

ORM pa kages

4

Numeri al Binary Formats

Why we need them?

The NPY format

The HDF5 format

The NetCDF4 format

Fran es

Alted

Data Serialization

Introdu tion

The Basi s

Relational databases

Numeri al Binary Formats

Summary

What serialization means?

Serialization is the pro ess of

onverting a data

stru ture or obje t into a sequen e of bits so that it

an

be stored in a le or memory buer, or transmitted a ross

a network

onne tion link to be "resurre ted" later in the

same or another

The basi

omputer environment.

me hanisms are to atten obje t(s) into a

one-dimensional stream of bits, and to turn that stream

of bits ba k into the original obje t(s).

¨C From

Fran es

Alted

Data Serialization

Introdu tion

The Basi s

Relational databases

Numeri al Binary Formats

Summary

Serialization tools

There are literally zillions of serialization tools and formats (text,

XML, or binary based), but well be fo using on those that are:

Easy to use

Spa e-e ient

Fast

In parti ular, we are not going to dis uss text-based formats (e.g.

XML, CSV, JSON, YAML ...).

Fran es

Alted

Data Serialization

Introdu tion

The Basi s

Relational databases

Numeri al Binary Formats

Summary

Serialization tools that

Python

omes with a

omes with Python

omplete toolset of modules for serialization

purposes:

pi kle, and its

ousin,

Pi kle, for qui k-and-dirty serialization.

shelve, a persistent di tionary based on DBM databases.

A

ommon database API for

ommuni ating with relational

databases.

Fran es

Alted

Data Serialization

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download