phpMyAgenda is based on database.
Actually, phpMyAgenda is implemented for mySQL, but because it uses an DB abtraction layer, it shouldn't be too difficult to implement other databases.
phpMyAgenda is event-oriented, meaning that an event record contains relations to other tables. But because an event is designed to have as many date/place as necessary, there is a date table that stores date, place and eventid.
The definition of the tables is the following :
Table admin
This table contain user records.
field | type | comment |
id | tinyint(5) | unique user identifier |
user | varchar(50) | user name |
pass | varchar(50) | user password crypted using md5 algorithm |
lang | varchar(20) | language for this user (plain text in this language syntax) |
active | tinyint(2) | 0 = not active, 1 = activated |
lastlogin | datetime | date and time of last login |
permissions | varchar(20) | admin = full access, write = read/write access, read = read only access |
sid | varchar(255) | session identification string (set up in cookies) |
Table date
This table contain date records. There is one record per date and many records can refer to a single event
field | type | comment |
id | tinyint(5) | unique date identifier |
start | datetime | date/time of start |
end | datetime | date/time of end |
event | smallint(5) | id of the event for this date |
place | smallint(5) | id of place where event takes place |
valid | tinyint(1) | 0=non valid date, 1=validated date (used for temporary creations) |
Table events
field | type | comment |
id | tinyint(5) | unique event identifier |
title | varchar(255) | Title of the event |
description | text | description of the event |
url | smallint(5) | id of url |
type | smallint(5) | id of type of event |
contact1 | smallint(5) | id of contact for this event (#1) |
contact2 | smallint(5) | id of contact for this event (#2) |
contact3 | smallint(5) | id of contact for this event (#3) |
contact4 | smallint(5) | id of contact for this event (#4) |
contact5 | smallint(5) | id of contact for this event (#5) |
valid | tinyint(1) | 0=non valid, 1=validated (used for temporary creations) |
Table contacts
A contact is composed of a company/structure information and a set of 5 peoples in this company
field | type | comment |
id | int(5) | unique contact identifier |
name | varchar(100) | Company name |
varchar(100) | Company general email | |
url | smallint(5) | Company URL |
phone | varchar(100) | Company general phone |
fax | varchar(100) | Company general fax |
address | varchar(255) | address |
town | varchar(100) | town |
zipcode | varchar(20) | zipcode |
country | varchar(20) | country |
name1 | varchar(50) | First people's name |
surname1 | varchar(20) | First people's surname |
function1 | varchar(20) | First people's function in the company |
email1 | varchar(255) | First people's email |
phone1 | varchar(20) | First people's phone |
fax1 | varchar(20) | First people's fax |
name2 | varchar(50) | Second people's name |
surname2 | varchar(20) | Second people's surname |
function2 | varchar(20) | Second people's function in the company |
email2 | varchar(255) | Second people's email |
phone2 | varchar(20) | Second people's phone |
fax2 | varchar(20) | Second people's fax |
name3 | varchar(50) | Third people's name |
surname3 | varchar(20) | Third people's surname |
function3 | varchar(20) | Third people's function in the company |
email3 | varchar(255) | Third people's email |
phone3 | varchar(20) | Third people's phone |
fax3 | varchar(20) | Third people's fax |
name4 | varchar(50) | Forth people's name |
surname4 | varchar(20) | Forth people's surname |
function4 | varchar(20) | Forth people's function in the company |
email4 | varchar(255) | Forth people's email |
phone4 | varchar(20) | Forth people's phone |
fax4 | varchar(20) | Forth people's fax |
name5 | varchar(50) | Fifth people's name |
surname5 | varchar(20) | Fifth people's surname |
function5 | varchar(20) | Fifth people's function in the company |
email5 | varchar(255) | Fifth people's email |
phone5 | varchar(20) | Fifth people's phone |
fax5 | varchar(20) | Fifth people's fax |
valid | tinyint(1) | 0=non valid, 1=validated (used for temporary creations) |
Table eventtype
field | type | comment |
id | int(5) | unique event type identifier |
type | varchar(50) | litteral definition of type |
Table place
field | type | comment |
id | int(5) | unique event type identifier |
name | varchar(100) | Place name |
varchar(100) | Place email | |
url | smallint(5) | Place URL |
phone | varchar(100) | Place phone |
fax | varchar(100) | Place fax |
address | varchar(255) | address |
town | varchar(100) | town |
zipcode | varchar(20) | zipcode |
country | varchar(20) | country |
contact1 | smallint(5) | contact #1 id |
contact2 | smallint(5) | contact #2 id |
contact3 | smallint(5) | contact #3 id |
contact4 | smallint(5) | contact #4 id |
contact5 | smallint(5) | contact #5 id |
valid | tinyint(1) | 0=non valid date, 1=validated date (used for temporary creations) |
Table url
field | type | comment |
id | int(5) | unique url identifier |
type | varchar(50) | litteral definition of type |