Re: How does Amazon do that?

2004-05-21 Thread Jeff Langevin
Assuming you have an "orders" table and an "orderDetails" table 
(containing orderID and productID of each item in the order) it would be 
simple.  Query the orderDetails table for any order containing the 
product ID of the item that the customer is looking at.  At the same 
time, pull the other items in those orders that are in the same 
category.  You'd might also want to pull a count of the number of times 
that product was bought at the same time so you can rank them from most 
to least often bought.

--Jeff

Qasim Rasheed wrote:

> I guess they have some sort of Recommendation and Referral  mechanism in
> place. It could be an attributes-based, item-to-item correlation and
> person-to-person correlation (Collaborative Filtering).
> 
> 
> Thanks
> 
> 
> Qasim
> 
> -Original Message-
> From: Tim Blair [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 19, 2004 5:22 AM
> To: CF-Talk
> Subject: RE: How does Amazon do that?
> 
>  > When you look around Amazon.com, and show an interest in
>  > something, there's always a part of the page that says
>  > "people who bought this also bought that
>  > .."   
> 
> The solution I came up with uses two tables - the product table (guess
> what that is?) and a product_link table.  The product_link allows me to
> store, well, links between products in an arbitrary way.
> 
> The link table has a 3-way PK of product ID, associated product ID and
> product link "type" - the type is just a numeric field which represents
> the type of link between the products which in my case includes "similar
> too", "related too", "cross sell with" and "also bought".  The first
> three are set via the admin.
> 
> The final field in the link table is a generic "data" field, which in
> the case of the "also bought" type is a count.  In this way I can grab
> the most popular "also bought" products with a nice simple query by
> ordering by the data field.
> 
> The "also bought" data is not generated on-the-fly - it could take
> wy too long to increment the appropriate counters for each
> product link when someone checks out, so instead it's done nightly (or
> whenever) on a schedule.
> 
> That's just one solution though...
> 
> Tim.
> 
> --
> ---
> 
> Maze Solver - http://tech.badpen.com/cfcontest/
> ---
> RAWNET LTD - Internet, New Media and ebusiness Gurus.
> WE'VE MOVED - for our new address, please visit our
> website at http://www.rawnet.com/ or call us any time
> on 0800 294 24 24.
> ---
> This message may contain information which is legally
> privileged and/or confidential.  If you are not the
> intended recipient, you are hereby notified that any
> unauthorised disclosure, copying, distribution or use
> of this information is strictly prohibited. Such
> notification notwithstanding, any comments, opinions,
> information or conclusions expressed in this message
> are those of the originator, not of rawnet limited,
> unless otherwise explicitly and independently indicated
> by an authorised representative of rawnet limited.
> ---
>   _
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: How does Amazon do that?

2004-05-19 Thread Tero Pikala
I think they use some tool like NetP from http://www.netperceptions.com/

Tero 
  - Original Message - 
  From: Qasim Rasheed 
  To: CF-Talk 
  Sent: Wednesday, May 19, 2004 4:20 PM
  Subject: RE: How does Amazon do that?

  I guess they have some sort of Recommendation and Referral  mechanism in
  place. It could be an attributes-based, item-to-item correlation and
  person-to-person correlation (Collaborative Filtering).

  Thanks

  Qasim

  -Original Message-
  From: Tim Blair [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, May 19, 2004 5:22 AM
  To: CF-Talk
  Subject: RE: How does Amazon do that?

  > When you look around Amazon.com, and show an interest in 
  > something, there's always a part of the page that says 
  > "people who bought this also bought that
  > .."   

  The solution I came up with uses two tables - the product table (guess
  what that is?) and a product_link table.  The product_link allows me to
  store, well, links between products in an arbitrary way.

  The link table has a 3-way PK of product ID, associated product ID and
  product link "type" - the type is just a numeric field which represents
  the type of link between the products which in my case includes "similar
  too", "related too", "cross sell with" and "also bought".  The first
  three are set via the admin.

  The final field in the link table is a generic "data" field, which in
  the case of the "also bought" type is a count.  In this way I can grab
  the most popular "also bought" products with a nice simple query by
  ordering by the data field.

  The "also bought" data is not generated on-the-fly - it could take
  wy too long to increment the appropriate counters for each
  product link when someone checks out, so instead it's done nightly (or
  whenever) on a schedule.

  That's just one solution though...

  Tim.

  --
  ---
  
  Maze Solver - http://tech.badpen.com/cfcontest/
  ---
  RAWNET LTD - Internet, New Media and ebusiness Gurus.
  WE'VE MOVED - for our new address, please visit our
  website at http://www.rawnet.com/ or call us any time
  on 0800 294 24 24.
  ---
  This message may contain information which is legally
  privileged and/or confidential.  If you are not the
  intended recipient, you are hereby notified that any
  unauthorised disclosure, copying, distribution or use
  of this information is strictly prohibited. Such
  notification notwithstanding, any comments, opinions,
  information or conclusions expressed in this message
  are those of the originator, not of rawnet limited,
  unless otherwise explicitly and independently indicated
  by an authorised representative of rawnet limited.
  --- 
    _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: How does Amazon do that?

2004-05-19 Thread Qasim Rasheed
I guess they have some sort of Recommendation and Referral  mechanism in
place. It could be an attributes-based, item-to-item correlation and
person-to-person correlation (Collaborative Filtering).

 
Thanks

 
Qasim

-Original Message-
From: Tim Blair [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 19, 2004 5:22 AM
To: CF-Talk
Subject: RE: How does Amazon do that?

> When you look around Amazon.com, and show an interest in 
> something, there's always a part of the page that says 
> "people who bought this also bought that
> .."   

The solution I came up with uses two tables - the product table (guess
what that is?) and a product_link table.  The product_link allows me to
store, well, links between products in an arbitrary way.

The link table has a 3-way PK of product ID, associated product ID and
product link "type" - the type is just a numeric field which represents
the type of link between the products which in my case includes "similar
too", "related too", "cross sell with" and "also bought".  The first
three are set via the admin.

The final field in the link table is a generic "data" field, which in
the case of the "also bought" type is a count.  In this way I can grab
the most popular "also bought" products with a nice simple query by
ordering by the data field.

The "also bought" data is not generated on-the-fly - it could take
wy too long to increment the appropriate counters for each
product link when someone checks out, so instead it's done nightly (or
whenever) on a schedule.

That's just one solution though...

Tim.

--
---

Maze Solver - http://tech.badpen.com/cfcontest/
---
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
--- 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: How does Amazon do that?

2004-05-19 Thread Tim Blair
> When you look around Amazon.com, and show an interest in 
> something, there's always a part of the page that says 
> "people who bought this also bought that
> .."   

The solution I came up with uses two tables - the product table (guess
what that is?) and a product_link table.  The product_link allows me to
store, well, links between products in an arbitrary way.

The link table has a 3-way PK of product ID, associated product ID and
product link "type" - the type is just a numeric field which represents
the type of link between the products which in my case includes "similar
too", "related too", "cross sell with" and "also bought".  The first
three are set via the admin.

The final field in the link table is a generic "data" field, which in
the case of the "also bought" type is a count.  In this way I can grab
the most popular "also bought" products with a nice simple query by
ordering by the data field.

The "also bought" data is not generated on-the-fly - it could take
wy too long to increment the appropriate counters for each
product link when someone checks out, so instead it's done nightly (or
whenever) on a schedule.

That's just one solution though...

Tim.

--
---

Maze Solver - http://tech.badpen.com/cfcontest/
---
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
---
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: How does Amazon do that?

2004-05-19 Thread brobborb
i dont know how they do it, but it shouldn't be too hard.

I would go about doing it this way.

I would have a table that has a customer_id, a product_id, and a category_id.  This table contains every product bought by every customer.

So let's see how this works

Lets say you are lookin at a product whose ID is 22, and category ID is 12.

Basically you search the table for rows where product id is 22 and category id is 12 to get the customer ID.  Now that you have the customer ID, let's say it's 342, you search the table for rows where the customer id is 342, and the category ID is 12.  That way, you will know if they bought anything else in the same category.

Of course, if you come up with multiple customer IDs in that first query, you will have to loop your searches :-D.

This is just off the top of my head, I'm sure it can be improved, or there could be a better way!

  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: CF-Talk 
  Sent: Wednesday, May 19, 2004 2:12 AM
  Subject: How does Amazon do that?

  When you look around Amazon.com, and show an interest in something, there's
  always a part of the page that says "people who bought this also bought that
  .."   

  How do they do that?

  Do they really build tables of related items dynamically from purchases?  Or
  do they have products categorised and just randomly pick products out of
  categories similar to the one you're looking at?

  Or do they do it another way?  Or how do other online stores do this?

  Reason for asking:  I am building an on-line store, and think it would be
  good to add this functionality if it's not too difficult.

  Cheers

  Mike Kear

  AFP Webworks

  Windsor, NSW, Australia

  http://afpwebworks.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: How does Amazon do that?

2004-05-19 Thread Maureen
I don't know exactly how Amazon does it, but I suspect they have a product 
to purchased product relational table, and when you select a product to 
view, they query the relational table for matches in the same category.  It 
wouldn't be difficult to do, but unless you limit the relational table to 
recent purchases or only those in the same category, it would get huge in a 
hurry.

At 03:12 AM 5/19/04, you wrote:
>When you look around Amazon.com, and show an interest in something, there's
>always a part of the page that says "people who bought this also bought that
>.."
>
>How do they do that?
>
>Do they really build tables of related items dynamically from purchases?  Or
>do they have products categorised and just randomly pick products out of
>categories similar to the one you're looking at?
>
>Or do they do it another way?  Or how do other online stores do this?
>
>Reason for asking:  I am building an on-line store, and think it would be
>good to add this functionality if it's not too difficult.
>
>
>
>Cheers
>
>Mike Kear
>
>AFP Webworks
>
>Windsor, NSW, Australia
>
>http://afpwebworks.com
>
>--
>[Todays Threads] 
>[This Message] 
>[Subscription] 
>[Fast 
>Unsubscribe] [User Settings]
>
>--
>2ba1c4.jpg
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]