PDA

View Full Version : Not sure if this is possible...


Dexx
04-03-2009, 08:20 PM
I want to create a program that tracks customers and products to purchase...but links them..?

Software Object - Products

Software Object - Customers


Object Product A shows list of Customers (Customer 1 - Customer 2 etc.) that have purchased Product A

Object Customer 1 shows list of Products purchased by the customer, Product A - B - C - D


Is this do-able currently with the relational databases? Would this be an example of a Many-to-Many? or still One-to-Many?

TigerSoftware
04-06-2009, 10:30 AM
I want to create a program that tracks customers and products to purchase...but links them..?

Software Object - Products

Software Object - Customers


Object Product A shows list of Customers (Customer 1 - Customer 2 etc.) that have purchased Product A

Object Customer 1 shows list of Products purchased by the customer, Product A - B - C - D


Is this do-able currently with the relational databases? Would this be an example of a Many-to-Many? or still One-to-Many?


Hi Dexx,


Absolutely, you can create a many to many relationship.

This is how I do it.

I name the relationship without the quotes "Customers-Products".
Than I select the customer object for the parent and the product object as the child. Since this is a many to many relationship it doesn't matter which is parent or child.

Now run the software and make sure they were added. You should have a list of product on each customer as well as a list of customers for each product.


Thomas