Description of the ECDB package

This package provides an API for initializing and manipulating a relational database representing an event calendar. In addition to methods that select, insert, update, or delete table entries, ECDB can generate iCalendar appointments and send them via email.

Calendar appointments include the starting date, starting time, ending date, and ending time for an event, whether there is some activity before an event and when that starts, and two optional alarms, with the times set on a per-user basis. The class will also send messages with or without calendar appointments to users to either an email address or to the user's SMS service. Each calendar appointment is tagged with fields that allow a previously sent calendar appointment to be updated.

The database tables can grouped into four catagories. These are shown in the following four diagrams. In these tables, column names followed with "(PK)" indicate a primary key, and those whose column names are followed with "(FK)" denote foriegn keys. The types are Java types, not SQL types. The Java types used, which are useful to document because of the use of JDBC, are the following:

  • int. The corresponding SQL type is an integer and the column cannot contain null values.
  • Integer. The corresponding SQL type is an integer type and the column can contain null values.
  • boolean. The corresponding SQL type is a boolean and the column cannot contain null values
  • Boolean. The corresponding SQL type is a boolean and the column can contain null values
  • String. The corresponding SQL type contains character data.
  • Date. The Java type is Date and the SQL type is a date.
  • Time. The Java type is Time and the SQL type is a date.
  • .
In some diagrams, tables shown in blue (or gray if printed with a black and white printer) are references to tables from another diagram.

The first diagram shows the tables for user data and some tables used to map cell phone numbers to the email address used by an SMS gateway provided by the user's wireless carrier:

diagram for the user table

The second diagram shows the tables for event owners, locations, events, and event instances:

diagram for the owner tabls

The third diagram shows the tables for alarms and for a default choice for attending activities before an event:

timing diagram

The fourth diagram shows the attendee table and tables defining a series:

diagram for attendees table