Gossamer Forum
Home : Products : DBMan SQL : Discussion :

n <==> n Relationships

Quote Reply
n <==> n Relationships
I don't think this is possible in Dbman SQL -- or not easily, but maybe somebody here could confirm it?

Create many-to-many relationships, eg
Code:
Category n<==>n Book
Author n<==>n Book

where ...
Categories may contain many Books
Books may be assigned to more than one Category
Authors may write many Books
Books may have more than one Author


This is not a critical issue for us, but it would be very helpful to know what is possible, and what is not.
Quote Reply
Re: [YoYoYoYo] n <==> n Relationships In reply to
DBMan can handle the many-to-many relationship. There should be three tables Category, Author, Category_Author

Category
--------
cat_id (PK)
cat_name

Author
------
auth_id (PK)
auth_name

Category_Author
----------------
cat_id (PK)
auth_id (PK)

Now create the Category - Category_Author and Author - Category_Author relationships.

You can have a look at relationships in our bookstore demo ( Book - OrderDetails and Order - OrderDetails) as an example.

TheStone.

B.