Luca,

I have worked on a following type of application for http://www.applevacations.com It 
is a travel information portal. User come to the site and can register on it by giving 
some preferences about his/her travel parameters(price ranges, durations, seasons, 
destinations, etc). We store all this info in seperate tables with user id. The 
applevacations company announces various packages for travel on a regular basis but 
wanted to send e-mails to users weekly according to the preferences choosen by them.

We developed a Java AWT application for doing the above job. We have created a stored 
procedure in database which used to run daily by a scheduler in the database and 
populates a table with the user data and the package announced according to his/her 
preferences. Later on when the application gets trigger it reads that populated table 
and sends mail to the user one by one. The populated table normally has 10,00,000 
records which used to take 4-6 hrs to complete the whole job. Parallely it sets the 
Mail sent flag of Populated table to Y so that next time when the application runs it 
doesn't send the mail again which is already sent.

Let me tell you the main structure of tables(dropping least required fields):-
User table -> User Id, Mail Id (User Id unique)

Preferred Price Ranges table -> User Id, Price Range Id (User Id & Price Range Id 
should be unique, Price Range Id corresponds to some price range defined in a master 
table)

Preferred Durations table -> User Id, Duration Id (User Id & Duration Id should be 
unique, Duration Id corresponds to some durations defined in a master table)

Preferred Seasons table -> User Id, Seasons Id (User Id & Seasons Id should be unique, 
Seasons Id corresponds to some Seasons defined in a master table)

Preferred Destinations table -> User Id, Destinations Id (User Id & Destinations Id 
should be unique, Destinations Id corresponds to some Destinations defined in a master 
table)

Packages Table -> Package Id, Price Range Id, Duration Id, Season Id, Destination Id

Populated table -> User Id, Mail Id, Package Id, Price Range Id, Duration Id, Season 
Id, Destination Id, Mail Sent flag.

I hope this will help you.

Thanks & Regards
Bhushan Bhangale
Infosys Technologies Ltd.
Pune - 411042
Tel : (Office) +91 (20) 2932800 Ext - 1176
Mobile : +91 9822454603
E-mail : [EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to