ERD: Ternary relationship

How do i get visual paradigm to do a ternary relationship between 3 tables.

in the example below;
i want to connect the product ,store and warehouse tables in a ternary relationship but when i try to connect the store table into the Producr_warehouse table so it can be Product_warehouse_store and have the store ID as a foreign key… VP makes a new table that is connected to Product_warehouse… instead of Having product_warehouse_store in 1 table



Do you mean create something like the attached diagram> If so, you can simply drag out the 1 to many relationship (see 1m.png) from Store and release it to Product_Warehouse.

Best regards,

Entity Relationship Diagram1.png


hey Rain.

Not exactly- What i wanted to do was to have one table for the Product, warehouse and store relationship.

I wanted a relationship between product, store and warehouse in one table. what you have is a separate table for Product_warehouse and Product_store relations… when i want all that into 1 table.

what you suggested was a one to many relationship when i want all the relationships to be many to many… where many warehouses can supply many stores and conversely many stores can be supplied by many warehouses… and so on

any ideas?

At the moment the M:N relationship will be converted to 2 1:M relationship automatically (for close to implementation). If you want to group the link entity into one table, do you mean something like the attached?

Best regards,

Entity Relationship Diagram1.png

Hey Rain…
THATS Exactly What i wanted to do…
how do i go on doing what you did above?

Sure, the following flash movie shows you how this can be done.

Best regards,
Rain Wong