Page 1 of 2

many to many relationships

PostPosted: Fri Aug 01, 2014 6:05 am
by samsinclair
IS' nm new in the forum but have been reading about this software in relation to my needs. Can this software handle many to many relationships?

Re: many to many relationships

PostPosted: Fri Aug 01, 2014 11:27 am
by mjhanna
A record in database 'A' can have a one-to-many relationship to some records in database 'B'. Likewise individual records in database 'B' could have a one-to-many relationship back to some records in database 'A'. Is this what you mean?

Re: many to many relationships

PostPosted: Thu Aug 07, 2014 8:53 am
by samsinclair
yes

Re: many to many relationships

PostPosted: Thu Aug 07, 2014 9:53 am
by mjhanna
Since you say yes, then the answer to your question is also yes. HanDBase has several one to many relationship constructs. There are some basic tutorials about using them on the company website.

Re: many to many relationships

PostPosted: Thu Aug 07, 2014 10:04 am
by samsinclair
thanks mjhanna for the quick reply. the challenge is I have 3 databases, A, B & C. A has many to many relationship with B and B has 1 to many relationship with C. is that possible with handbase? which is appropriate to use? link/linked or relationship?

Re: many to many relationships

PostPosted: Thu Aug 07, 2014 10:21 am
by dhaupert
Hi,

I'd recommend the relationship if you already have unique id's/keys within the database. For example, a customer ID, customer name, etc.

The link/linked pair are for a one to many design (though I've seen people use each of them on both sides to approximate a many to many) where you don't want to create or maintain a unique identifier for each record. The link/linked does this for you.

But the relationship field is far more flexible assuming you have these ids already in your design.

Re: many to many relationships

PostPosted: Thu Aug 07, 2014 11:16 am
by samsinclair
yes, I do have unique identifier and so will use relationship. thanks heaps

Re: many to many relationships

PostPosted: Thu Aug 07, 2014 11:45 am
by samsinclair
joining B and C with relationship is now done and looks ok. next is A and B which is many to many relationship. I will try that later and hopes I will get it. thanks

Re: many to many relationships

PostPosted: Thu Aug 07, 2014 12:10 pm
by dhaupert
Hi there,

When you set up a relationship field in HanDBase, it does two things for you:

1. Let's you pull a single value from a related table's record to show in your database record.
2. Provides a jump to show the matching records from your database record.

There is no option to show all related records without tapping a button and jumping to a different screen as our Edit Record and Forms screens are both limited to a single data record in a table. But with the #2 option above you can quickly get to your related records.

I'd suggest reading through a few of our Relationship documents to see how this is done:
http://ddhsoftware.com/knowledgebase.html?read=221
http://www.ddhsoftware.com/knowledgebase.html?read=195

Hope this helps!

Re: many to many relationships

PostPosted: Thu Aug 07, 2014 5:21 pm
by samsinclair
thanks; these are good read. will implement them soon.