OK, this is probably just an over-cautious MySQL question.

All of the examples I look at for setting up per-user prefs using SQL show
creating a table that looks like:

username  pref  value

So, if I want to allow users to control 5 values I would have a table that
looks like thsi:

user1  pref1  value1
user1  pref2  value2
user1  pref3  value3
user1  pref4  value4
user1  pref5  value5
user2  pref1  value1
user2  pref2  value2
user2  pref3  value3
user2  pref4  value4
user2  pref5  value5
user3 ..... etc.

When talking about importing a userbase of 6000+ that's gonna be a TALL
table really fast.

Is there no way to do it with a table that looks like this?:

username pref1 value1 pref2 value2 pref3 value3 pref4 value4 pref5 value5

So we'd end up with:

user1 pref1 value1 pref2 value2 pref3 value3 pref4 value4 pref5 value5
user2 pref1 value1 pref2 value2 pref3 value3 pref4 value4 pref5 value5
user3 pref1 value1 pref2 value2 pref3 value3 pref4 value4 pref5 value5
user4 pref1 value1 pref2 value2 pref3 value3 pref4 value4 pref5 value5
etc.

Only one row per username rather than one row for each pref for each
username.

The only prefs I'm not sure about working in this fashion are things like
white/black lists and allowed language choices. Things that can have
multiple entries that should be additive and can have a different number of
entries for each user.

And to add to the fun, I'm going to have to create a flat file with all of
the info to import current customer data into each table. I'm exporting to
comma delimited from an Access database. Massaging in Excel to remove extra
columns and add default data to newly inserted columns. Moving to the linux
box and importing to MySql with LOAD DATA LOCAL INFILE.

And I need to have this operational by the week of May 30th. Cool beans. I
haven't even figured out how to do Bayes in SQL yet -- or how to have my
users be able to TRAIN bayes since most will be downloading with POP3. How
the heck are they going to get the messages back into a place where
sa-learn can hit them?

Postfix 2.1.5
SA 3.0.2
MySQL 4.0.24

and, to make life difficult on the "using SQL" end

Amavisd-new 20030616p10

Ideas or a more complete walkthrough for setup.

TIA

Gerald

Reply via email to