Doco Home Overview Home

Database Schema

The tables used in the Platypus Timesheet tutorial are:

  • Company - name, physical and postal addresses, other details (phone, etc).
  • Person - first name, surname, company reference, authorisation level, other details (email, etc).
  • Activity - names of activities to record, flag to indicate if usable by contractors.
  • Project - name, company reference (who the project was for), status, etc.
  • TimeEntry - references to person, activity and project, date, details and number of hours.
  • ObjectId - used by Enhydra to hold the next usable Object Id.
  • As this database is used by Enhydra, all tables require an Object Id and Version fields. The Object Id field makes all records within all tables unique. Further restrictions apply as follows:

  • Company - each company name is unique.
  • Person - each person must have a first name, surname and username. Also the person must have an authorisation level (default none) and be of type 'staff' or 'contractor'.
  • Activity - each activity name is unique.
  • Project - each project name is unique.
  • TimeEntry - there are no specific restrictions as it's possible to have multiple entries for each person, project or activity on any date.
  • To see the full schema generated by DODS, examine the create_tables.sql file.