Stuart McLachlan
stuart at lexacorp.com.pg
Tue Oct 31 09:44:08 CST 2006
On 31 Oct 2006 at 9:47, William Hindman wrote: > ...given four tables > > tblContact pk ContactID fk CompanyId > tblCompany pk CompanyID > tbEvent pk EventID > tblEventReg pkERID fk EventID fk CompanyD fk ContactID > CompanyID is redundant in tblEventReg since you have ContactID which points to tblCompany via tblContact. > ...tblEventRegistration is a join table to show which contacts from which > companies attended which events. ...given that thousands of contacts attend > each event, tblEventReg is growing logarithmically > > Q: is it feasible to use a numeric field in the tblContacts to replace > tblEventReg by using event checkboxes instead, assigning them a numeric > value by show and then mathematically summing them in the numeric field > ...thus using one integer to represent every event attended by that contact? > ...yes/no? ...pros/cons? Yes but... You would need to bit mask the attendance to find out which events were attended which means your Events would need to be numbered 1,2,4,8,16,32,64..... You would be limited to a maximum of 63 events if you store it as a long (The 63rd event would be EventID 9223372036854775808) -- Stuart