The IMP Database Structure
The IMP database is very simple. It consists of two tables. The first table, named imp_addr, holds the name and address information for user contacts. The other table, named imp_pref, holds the user preferences.
All the fields except for one are text fields. This allows unlimited length for these fields. MySQL handles the storage issues. The lang field in the imp_pref table is a varchar field of length 30, because its length requirements are well known by the designers.
The IMP database is shown in Figure 3.2. It is a very simple database, easily understood. This shows that simple databases can be very useful.
Figure 3.2 The IMP database graphic structure as shown by Dezign.
The imp_addr table stores the username in the user field. Because all user logon names on a Linux machine are unique, all searches are done on this field. The address field contains the full email address of the contact. The nickname field contains a brief name by which you can remember the user. The fullname field contains the user's full name. This table is not indexed. If it were indexed, a non-unique index could be put on the user column.
The imp_pref table stores the username in the user field, identical to the imp_addr table. The fullname field contains the user's full name. The replyto field contains the reply address the user requires his email to display. The lang field contains the language preference. The sig field contains the user's signature text to be placed at the end of his email.