Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The hitchhiker’s guide to databases with Python...

The hitchhiker’s guide to databases with Python (from web point of view)

The hitchhiker’s guide to databases with Python
(from web point of view)

Volodymyr Hotsyk

September 01, 2014
Tweet

More Decks by Volodymyr Hotsyk

Other Decks in Programming

Transcript

  1. Who am I • Sr Python developer in GetGoing, Inc

    • Previous: oDesk Inc, 42coffeecups, .. • In love with Python since 2007 • Organizer of PyCon Ukraine, KyivPy
  2. Databases • A database is an organized collection of data.

    • Database management systems (DBMSs) are specially designed software applications that interact with the user, other applications, and the database itself to capture and analyze data.
  3. History • 1960s, navigational DBMS • 1970s, relational DBMS •

    Late 1970s, SQL DBMS • 1980s, on the desktop • 1980s, object-oriented • 2000s, NoSQL
  4. Berkeley DB • Designed for embedded systems • Records are

    (key, value) pairs. • Fast, reliable, transaction-protected record storage.
  5. Berkeley DB • Only a few logical operations on records:

    • Insert a record in a table. • Delete a record from a table. • Find a record in a table by looking up its key. • Update a record that has already been found.
  6. Redis • Redis is an open source, BSD licensed, advanced

    key-value cache and store. • It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
  7. Hot-Redis • https://pypi.python.org/pypi/hot-redis/ • Wrapper to redis-py library • Provides

    a wide range of data types that mimic many of the built-in data types provided by Python
  8. Using for Web apps • Lightweight async workers • Fast,

    not reliable storage • Messaging (pubsub, queues) • Realtime data processing (logs) • Autocomplete • Cache, sessions
  9. MongoDB • MongoDB is an open-source database built for scalability,

    performance and high availability, scaling from single server deployments to large, complex multi-site architectures.
  10. Using in web • Main data storage • Big data

    storage and processing • Backend for mobile apps • Zero-downtime environments
  11. SQLite • SQLite is a software library that implements a

    self-contained, serverless, zero- configuration, transactional SQL database engine. • SQLite is the most widely deployed SQL database engine in the world.
  12. MySQL • One of the most widely used open-source relational

    database management system • A broad subset of ANSI SQL 99 • Stored procedures • Triggers • Views
  13. PostgreSQL • Object-relational database management system (ORDBMS) with an emphasis

    on extensibility and standards-compliance • Implements the majority of the SQL:2011 • Replication • Indexes • Foreign data wrappers
  14. SQLAlchemy • Open source SQL toolkit and object- relational mapper

    (ORM) for the Python programming language released under the MIT License.
  15. Django ORM • Django attempts to support as many features

    as possible on all database backends. • Port of code between different databases (???)