Skip to content
andrewtracer edited this page Jun 24, 2011 · 1 revision

The Database

User

These are some of the fields in Django's contrib.auth user module (see https://docs.djangoproject.com/en/dev/topics/auth/ for a full list)

  • username (it's the email
  • email
  • first name
  • last name

UserProfile

These are any of our own properties that we'd like to know about our users

  • Display Name

File

Files will be stored in a folder on the disk (no hashing to make directory structure for now), with references to their location stored in the database based on their SHA1. Thus, if we change a file, then it will be a different file. We may tag files to be able to associate them with each other.

  • permissions (these are the permissions associated with this template)
  • Name (SHA1 hash of the file contents)
  • location of file on disc
  • metadata (many to many relationship with metadata table )

MetaData

This table will allow us to eventually do searches by metadata

  • File (the file this tag is associated with
  • Key (ex. 'monitor')
  • Value (ex. '130442')

Template

  • Title (experiment.name)
  • Representation (this is Paul's storage representation)
  • user
  • permissions (these are the permissions associated with this template)

Project

  • Title (experiment.name)
  • user
  • permissions (these are the permissions associated with this project)
  • Experiments (many to many)
  • Template Instances (without intermediate data) (many to many)

Experiment

  • IMS Proposal/Request #
  • Files
  • users
  • permissions (these are the permissions associated with this project)
  • instrument

Instrument

  • Name (ex bt7)
  • Templates
  • MetaData
  • Calibrations (for example, where do calibrations live)
Clone this wiki locally