Last post Jan 19, 2011 05:29 AM by KumarHarsh
Jan 06, 2011 09:47 AM|gjwcarsaig|LINK
If I have an Access database with two tables, called 'Users' and 'Items', what is the method to create a watch list, so a user can login and see the list of items they have chosen to watch (as you can in ebay for example)?
I thought the solution might involve using code to modify the relationships between the two tables, but am not sure how this would work in practice.
I've searched for answers, but have not made any progress, so I would appreciate any help.
Jan 06, 2011 10:16 AM|SGWellens|LINK
You need a many-to-many table, also called a junction table. With these fields:
ID UserID ItemID
Jan 06, 2011 11:09 AM|gjwcarsaig|LINK
That sounds like the best method.
Obviously if you had a large number of users watching a lot of items each, the junction table could potentially become quite large in terms of the total number of records:
(total no. of users x avg no. of items watched per user)
but the low amount of memory needed for each record in this table would compensate.
Thanks for your help.
Jan 12, 2011 11:59 PM|Hong-Gang Chen - MSFT|LINK
How about use a XML to description the items and save the XML to database.
Jan 19, 2011 05:29 AM|KumarHarsh|LINK
You can create table like junction.
you can allow user to remove item. if volume is more then you can restirct no. of item chosen by user.
Other possibility is xml.
I can't think of other way.