Thread: arrays vs. columns

arrays vs. columns

From
Mark Nelson
Date:
Hi,

I'm wondering about the efficiency of using an array in a single
cell vs. making a table with lots of columns (like 50-70).

Here's what I'm doing. I'm working on an application where a user
goes through a program that has between 50 and 70 pages and it is
critical to know which pages the user has been to, and how many
times. Something of an accurate counter, but one that can
distinguish between users. So each time a user goes to a page, a
number is incremented for that user on that page.

I could either make a table with columns for each individual
page and when the user hits the page, it sends the query to the
table incrementing the field for that user, or I could have a
table where there is one column that holds an array with all the
pages and their related counts. The second option means I would
be updating that one cell for each page visited. But I seem to
have read somewhere that if you are going to make lots of updates
to an array, it is better to put the array items in their own
columns.

Anybody have any advice?

/mark


Re: arrays vs. columns

From
Bruno Wolff III
Date:
On Mon, Nov 25, 2002 at 09:50:24 -0700,
  Mark Nelson <MCN@cc.usu.edu> wrote:
>
> I'm wondering about the efficiency of using an array in a single
> cell vs. making a table with lots of columns (like 50-70).

You also have the option to make a table that has a row for each user-page
combination.