[Catalyst] More complex Class::DBI::Sweet usage?

Jules Agee julesa at pcf.com
Fri Jul 1 01:44:28 CEST 2005


Would it make sense to use Class::DBI::Sweet in this example? If not,
what approach would you use? I've got five tables, and the ipaddr and
login tables are populated automatically from log files. I want to be
able to see what systems a particular user logs in from, and which users
are logging in from a particular system, either way.

Tables:
user (id, username, userid, etc.)
login (user, ipaddr, date, time)
ipaddr (ipaddress, macaddr, date, time)
macaddr (macaddr, system)
system (id, description, etc.)

AdminDB::User->has_many(logins => 'AdminDB::Login');
AdminDB::Login->has_many(ipaddrs => 'AdminDB::Ipaddr');
AdminDB::MacAddr->has_many(ipaddrs => 'AdminDB::Ipaddr');
AdminDB::System->has_many(macaddrs => 'AdminDB::Macaddr');

Any suggestions would be very much appreciated.

-Jules



More information about the Catalyst mailing list