Skip to content

Which database to use?

Varrun Ramani edited this page Jan 15, 2014 · 3 revisions

Note: Forking discussions from issue #2

Please list the pros and cons of different databases under consideration. Factors to keep in mind are

  1. CrisisCommunicator currently uses a SQLlite backend
  2. Interaction of the Message Daemon(MD) with the same database used by the web application.
    • The MD receives/sends messages over the underlying network
      • On a receive, the MD may have to query the database. e.g. match a person to the missing persons database.
      • A Send is triggered by the UI. e.g. add a missing person sends out a detail to all devices on the network
  3. CrisisCommunicator currently uses Django. Hence, the choice of DB should play well with Django.

Table of Contents

Choices

SQLlite

Pros

  • Very popular database - with a large number of OSS projects.
  • Already being used by the application
  • Good support with Django
  • Easy querying using SQL
  • Has a proper schema

Cons

  • Takes more memory
  • Requires significantly more code - using Django Models
  • Message Daemon implementation will be tougher/bigger

ZODB

Pros

  • Faster
  • Easy to code - because it uses Object Oriented principles.
  • Perfect for use with the Message Daemon - will simplify code greatly.

Cons

  • Well known, but not widely used database
  • Django ZODB connector is work-in-progress.
  • Querying will be hard without the right object mappings.
  • Migration to ZODB will take time and a lot of effort(but not impossible)

Clone this wiki locally